Various visa options dependent on your circumstances. If you are over fifty then ‘non O’ may be your best choice. This you apply for from outside of Thailand. There are financial requirement in order to qualify.
Also, be aware that you can’t work there without a work permit. So, you need to be of independent means.