Keep Your King Safe: Spot Checks and Mating Threats Early
When the danger after your move is a check or a mating attack, this is the habit to build.
If the review shows that your opponent's best reply was a check, a fork with check, or a mating attack, the problem was king safety. These moves are the most expensive in the game, because one check can win a piece and one missed threat can end the game.
The habit
Castle early, usually in the first ten moves, unless you have a clear reason not to.
Leave the pawns in front of your castled king alone. Each pawn move there opens a door for enemy pieces.
Before every move, list every check your opponent could give afterwards. If any of them wins something, change your move.
Count the attackers near your king. If three or more enemy pieces are aiming at it, defend first and attack later.
Common ways the king gets caught
The back rank: your king is boxed in by its own pawns and a rook or queen mates on the first rank. Give it an escape square (a quiet pawn move like h3) when things calm down.
The f7 and f2 squares: early in the game they are defended only by the king. Watch for a queen and bishop aiming there.
Forks with check: a knight check that also attacks your queen or rook. Check where enemy knights can jump next to your king.
In the review, open The danger view on the move: the orange arrow shows the check or attack your move allowed. Then look at the move marked Better to see how a safer move avoided it.