I would suggest visiting other similar countries first.
One can be a long term tourist in some (Philippines is basically forever) while being nomadic between several keeps you within the rules of being a tourist in others.
Yes there are ways to stay in Thailand long term before 50. Some are grey area and some are 100% above board.
But until you have experienced several countries and areas within each you really can’t know what you like or don’t.
Given Thailand doesn’t want people living there on the wrong visas it is worth traveling more to be sure you want to put in the effort.
Once you are 50 as long as you have the income/assets it is relatively easy to stay in Thailand.
Before that why not not make sure it is best for you?
while true the only people to have been detained (arrested?) for being digital nomads were quickly released. Happened to a few groups several years back.
And low level officials even made statements it is allowed.
Clearly there is no law saying it is legal. But current interpretation of the law by authorities is that it is.
That could change at any moment.
But Thailand is the most light grey for digital nomads that I know of.