@Pete ******
Thank you very much for your reply.
I now understand that in order to obtain the Thai tax residency certificate, I first need to apply for a Tax Identification Number (TIN) and file at least one income tax return (P.N.D. 90 or 91), even if I haven't had any income in Thailand.
I will start by registering for a TIN at the local Revenue Department office, then file a return, and only after that proceed with the certificate application.
Your clarification was very helpful—thanks again!