The tack you are on is determined by the wind
. Whatever side of the boat
the wind is touching first is the tack. So if the wind is passing from starboard to port, then you are on the starboard tack.
The boom can move from side to side during sailing handling or for many other reasons, but the surest fire way is to just think about what side of the boat
the wind touches first as it moves past the boat.