the Tourist SIMs are normally valid for 1-3 months and then they expire automatically unless you continue to top up/add credit. They are pre pay. So no commitment period at all. You will need to provide passport or ID to purchase a SIM in Thailand btw.
You can get a Thai SIM either at airport or at 7-11 which comes with a starter amount of data. Then if you add credit either through the app of the service provider or at 7-11, you can add a ‘local Asian countries’ (which will cover Cambodia, Vietnam etc) roaming pack through the app or via sms service codes that you’ll find on the website of the service provider.