eSim if your phone is compatible
If you have 2 days in Tokyo coming from Thailand instead of buying a Thailand and Japan SIM/eSim get a Regional eSim that covers ALL of Asia. A Regional eSim is only nominally more expensive than a Local eSim. What's best is there is no fumbling with changing SIM cards and a simple reboot (maybe create an APN) of your phone once you land is all you have to do for most countries. I use Airalo but I'm sure other eSim sellers have the same type of eSim.
Current AIS Price for Data Only Service
When you go to buy and install your ESIM for Thailand use, the kiosks are likely to feature plans that provide a combination of cell data, phone services, and SMS text services. In my case I typically don't use my Thai phone number for calls or SMS. I use it only for Line, WhatsApp, WeChat, email, apps to my banks back home, general internet surfing, and watching television using my android TV box (IPTV). None of those things require using a Thai phone call or SMS message. So, I don't advance pay for those things.
Yesterday I bought a cell data plan the most convenient way possible. While walking from my airport arrival gate to Immigration, I stopped at an AIS kiosk and bought 6-month, unlimited data, at up to 6 MPS for 1800 baht. I encourage others to consider data only plans. They have many other data only plans available; faster/slower, specified data limits/unlimited data, and longer/shorter duration. This plan works for me, the last time I opted for 5 MPS for a little less money. I like dealing with the kiosks at the airport because I'm lazy and simple, those people are fast, and efficient at getting you set up and on your way. I think price is same at airport and other suppliers.