Single-player games ask "can I reach the goal?". Two-player games ask "can I force a win against a perfect opponent?". In single-player games, you search for any winning path. In two-player games, you need to prove that all opponent moves lead to your win. This changes the algorithm.
You use minimax-style reasoning, alternating between max and min players at each level. In single-player games, you improve your own score against fixed rules. In two-player games, your opponent actively tries to minimize your score, forcing you to think multiple moves ahead.