It’s perfectly legal to be a tourist in most countries.
There is no limit to the number of times you can enter a country. (Thailand has a restriction on land border crossings. I believe twice a year but I always fly so never worried about that)
If you’re planning on something other than visiting then you need to apply for the appropriate visa. From your description of your plan you’ll be fine on tourist entry.