There are several schools on Koh Phangan that offer Thai language courses and visas, one of the most common is KPT Language School located in the center, you can contact them for more information.
As of December 2026, you apply for the visa online through the e-Visa system (thaievisa.go.th) while outside Thailand — for example, in Malaysia, just as for a tourist visa. The course will provide you with the relevant documents, but if they are not included in the course price, you will have to pay for them yourself.
If you wish to study Thai, please go for it!