At first, you simply expand your attention beyond your own cards. You begin to think more often about the opponent's hand, based on his actions. Almost everyone does it at least on a subconscious level, but you need these thoughts to be intentional and structured.
The following steps may help. Do them for a while outside the tables, and when they are already in order, start practicing them in the game.
Classify your opponent.
Give it a starting range based on its position and actions.
Narrow the range by getting information in the form of flop cards and its actions.
Repeat this on each new street and / or with each action.