You will usually get the best rate when using a debit card from an ATM.
Make sure however that:
- You check your card issuer's currency exchange and foreign transaction fees and commissions. Most banks are reasonable, some will charge through the teeth, others are really cheap. It may be useful to open an account with one of the "neo-banks" (Revolut, Wise, etc.) to get the cheaper rates.
- If the ATM gives you the option to charge in your home currency, usually don't accept that, as you'll generally get a worse rate.
- The ATM doesn't charge large fees. Don't know the practice in Thailand, but in some countries like the US or UK you should use ATMs in bank branches rather than ATMs in convenience stores for instance, as those charge very large fees.
- Before leaving, make sure you have notified your card issuer of your travel plans so they don't block your card.
- It's always a good idea to have at least two cards from two different issuers, ideally on different networks. Even if you warn them, sometimes use in foreign countries may trigger security alerts and block your card, so it's good to have a backup.
Depending on the fees (either from your bank or from the ATM), it may make more sense to make fewer larger withdrawals rather than a lot of small ones.
Generally, do not use a credit card, as ATM withdrawals are cash advances, and those usually mean high fees on credit cards (exceptions for "deferred debit" in France for instance, which are labelled as "credit" but act like debit cards for ATM withdrawals).
Currency exchange will usually be a lot more expensive, and would require you to carry large amounts of EUR.
Note that generally, your best option is to use your payment card directly for purchases, but again, check your card issuer's fees.