l have had my car and motorcycle license in my country since I was 16 and I was a professional driver for 30 years. Have driven in more than a dozen countries.
The first time I got my Thai license, all I had to do was show my home license and my International Drivers Permit and have necessary paperwork. I got 2 year car and motorcycle licenses in about a half hour, no tests at all. After 2 years renewed my temporary 2 year licenses for permanent 5 year licenses. No written or road test then either.
My permanent Thai licenses expired when I was away during COVID. To my surprise (and to the surprise of the agent helping me) they required me to do a written exam for each license. Passed the motorcycle (48) test and failed the car test (43).
Since the motorcycle one was the only one I really needed, I took a few months before I wrote the car test again.
I got a link from the agent. https://thaidriveexam.com/ I must have done the test 50 times with about a 45% success rate.
I finally took the test a few weeks before leaving Thailand and passed, they gave me another 2 year temporary license.
The English translation of these tests are really bad in my opinion. The questions are barely understandable, poorly worded, a lot of double negatives. I suspect it is a machine translation from Thai that doesn't handle Thai grammar well. I have come across a few questions that have an absolutely wrong answer. Study the questions and answers. Learn the answers they are looking for, not necessarily the "correct" answer. This site does show you what you got wrong.
I would be surprised if any foreigner was able to pass both test on the first try