Laos and Cambodia are geographically and culturally close to Thailand, and they both experienced communist insurgencies that led to the establishment of socialist regimes (Khmer Rouge and Lao People's Democratic Republic). Given how close they are to Thailand, why wasn't communism similarly embraced in Thailand?
This is pretty simple question, so I won't go too in depth. That being said there are still many aspects to answering this question, but nothing that requires too much background in Thai history.
The Thai monarchy is a very powerful influence on Thailand. Even in today's world the monarchy plays a large aspect in everyday Thai life. When you go to the movie theater in Thailand before the film begins you are supposed to stand at attention as the royal anthem plays with clips showing how much the king as done for the country. Driving down the motorway you'll see posters of the king and queen. It is a prisonable offense to insult or challenge the monarchy in anyway. That includes stepping on Thai currency which depicts King Rama IX or X. In school you might learn หนึ่ง มีความ รักชาติ ศาสนา พระมหากษัตริย์ซึ่งเป็นสถาบันหลักของชาติในปัจจุบัน (Love your country, your religion, and the King which are now pillars of the Thai nation) or เจ็ด เข้าใจเรียนรู้การเป็นประชาธิปไตยอันมีพระมหากษัตริย์ทรงเป็นประมุขที่ถูกต้อง (Learn about and understand the correct concept of democracy with the King as head of state.)
The Thai monarchy is a symbol of political authority and legitimacy in Thailand and it's been this way for the last 850 years for the most part. There was a brief period between 1932 to 1945 when royal rule was interrupted. In 1932 the Siamese Revolution happened and absolute monarchy was ended in Thailand with a constitutional monarchy taking its place. In 1933, the Siamese coup d'etat occurred with Colonel Phot Phanonyotin taking over the constitutional government and placing the country effectively under military rule.
King Rama VII would abdict his throne in 1935, and Siam would have a boy king in Rama VIII take his place. He did not come of age until 1945. In 1937 after a scandal Colonel Phot stepped down and was replaced by Marshal Plaek Phibunsongkhram. He was a ultranationalist, borderline fascist, and focused heavily on Thaification.
A important sidenote for context. Thailand isn't actually 100% homogenous like a lot of Westerners might think. The Northeastern region is called Isaan and they speak the "Isaan dialect" which is actually a political way to say they speak a Laos dialect(Isaan is extremely related to the Laos language). In the North they speak Kam Mueang. In the South they speak Dambro. In addition you have enthic groups like the Mon and Malays. The offical Thai language is actual central Thai. If you ever try to learn Thai what you are learning is central Thai.
This leads me to our next point. Marshal P issued the 12 cultural mandates in 1939 to 1941 after changing the name of the nation to Thailand. The 12 Mandates can be read here in English. I wish I could give a better link, but I assume most people can not read Thai. https://en.wikipedia.org/wiki/Thai_cultural_mandates#Mandate_1
The main points from the mandates I would bring attention to are:
"Thai people must extol, honour and respect the Thai language, and must feel honoured to speak it."
"Thai people must not consider place of birth, residence, or regional accent as a marker of division. Everyone must hold it to be true that all born as Thai people have the same Thai blood and speak the same Thai language. Place of birth or accent makes no difference."
"When the royal anthem is heard, whether played for official purposes, at the theater or any gathering, participants or attendees will honour the royal anthem according to regulation or custom."
"Thai people must never reveal anything to foreigners that might damage the nation. These actions are a betrayal of the nation."
As you can see these values place great value on being Thai, and the monarchy. The are very nationalistic and instilled on the generation nationalistic pride. Which still holds true today, as many of the points of these mandates are still in effect today just reworded.
Marshal P. continued with his ultranationalism by allying Thailand with Imperial Japan in WW2. Thailand was never colonized by the West which is a factor in of itself to resisting communism. But it had lost territory to France and Britain. Which is why Thailand invaded Laos and Cambodia in 1941 and Burma in 1942. Regaining some of its lost territories. As an additional sidenote Thailand politically holds some hostility towards the Khmer(Cambodians) and Burmese ppl. They have centuries of conflict and have to this day general level of distrust at the unoffical level. At the personal level some Thai look down on Khmer and Laotians. This was even more true 50 years ago. But even today it's not hard to find some Thai ppl being discriminatory towards Khmers. These makes the spreading of political movements from let's say Communist Cambodia in 1977 to the average Thai rather difficult when the Thai is immediately going to be discriminatory to the Khmer trying to spread the "values" of communism.
After WW2 the military stayed in power with Marshal P being Prime Minister until 1957. During the late 40s, Thailand came under the influence of the US and in 1950 after most likely ordering his brother's assassination King Rama IX became king.
Rama IX is beloved in Thailand. To the point of divinity almost. Under his reign the country experienced rapid modernization, living standards raise, and miltary successes such as in the in the Korean War(one famous battle with Thai troops is Porkchop Hill actually).
Before I ramble on more I'll summarize because I think you are starting to see the picture. So here this the TLDR.
TLDR: Thailand was (and unfortunately still is) politically for the last 80 years heavily under the control of the miltary and borderline fascist. The miltary promotes and uses the monarchy as a symbol of national unity. The monarchy since 1950 until about 2012 was beloved by a majority of Thais due to many giving the monarchy credit for Thailand's rapid growth following WW2. Thailand never experienced colonialism and thus never was a hotbed for national unification movements like in Vietnam, or the ill effects colonialism brought to countries like Laos or Cambodia.