I’ve been to both Thailand and Vietnam as a young traveller. I hate to say it but although they do have strict etiquette for themselves they are well used to tourists pleasing themselves, and expectations for tourists are very different.
In beach areas beachwear is fine, but I wouldn’t wander through the middle of Bangkok in a bikini, much like I wouldn’t in a London or New York. Some places you visit have minimum dress requirements - long skirts, shoulders covered, men in long trousers etc. But it’s easy to find this our in advance and they have clothes you can borrow if you aren’t appropriately dressed.
You may attract attention walking around if you are ‘underdressed’ but you may also attract attention if you are properly dressed too. People don’t tend to be shy if they want to stare at you.
There have been high profile cases of people being prosecuted for being disrespectful to religious statues etc. But it’s very easy not to do that.
Before I went I was told to behave as if my grandma was watching me and I didn’t want to disappoint her. In most situations in life I find this pretty good advise (my grandma was cool but respectful).
It’s a lovely part of the world and if you take your cues for what’s going on around you it’s perfectly possible to have an amazing, safe time there.