You may be considered a tax resident of Thailand if you spend 180 days or more in Thailand during a calendar year.
https://www.rd.go.th/english/6045.html