E-sims are generally a good way to go. Usually they're data only without a phone number, but there maybe be some one specifically for Thailand that include having a number. I have found I don't need the phone number and can usually do everything through data only.
I've used Saily and Airlo. Both worked fine.