Mostly by learning basic checkmates and basic common endgames called "theoretical endgames"
King + Queen checkmate, King + Rook checkmate and King + pawn vs King checkmate are probably the three most important of these. Here is how to win the pawn endgame if you aren't familiar with the technique already:
Someone messaged me and told me my aimchess accuracy and the results told me to practice endgames so.."HOW TO WTUDY ENDGAMES