A good summary is found here:
"The CRS seeks to establish the tax residency of customers. Under the CRS, financial institutions are required to identify customers who appear to be tax resident outside of the country/jurisdiction where they hold their accounts and products, and report certain information to our local tax authority. They may then share that information with the tax authority where you are tax resident."
Frequently asked questions | Common Reporting Standard (CRS) | HSBC
The TRD has no right to directly contact your overseas financial institution. It may request information from the Revenue Department, or equivalent, of the country that institution is located in.
I find it strange that all countries where I have bank or brokerage, or fund accounts asked me to declare my tax status, including the TIN, some years ago. This one was sent to me by a funds management company in Australia back in 2018, and I had similar from other accounts there, in Singapore, and the Isle of Man, around the same time:
However, none of my banks in Thailand have requested this information, which makes me wonder how do they know if we are tax residents of Thailand or elsewhere, and, if the latter, where? And how do they report our account and tax status details to the TRD so it can fulfil its obligations under the CRS?