how to spot opponent's tactics?

Look at the board for a while , if you are able to find a tactic , try to interpret what their next move will be. If you aren't able to find one , try flipping the board , it helps you look from their point of view and might help you in identifying their tactic and find a gap in your defence which the opponent might be targeting

Helps if you know what is in a position in the first place. The idea behind the opening and middle game otherwise you might not know what is available to look for.

Practice tactics from opponents point of view
For example. Some chess books have the position always set up from whites point of view, but they'll tell you it's black to play. So you still solve them from the losing sides viewpoint
So you get into the habit of doing tactics against opponent, but also solving tactics against you