A conservative, Mr. Yoon won the presidency in 2022 by a slim margin, promising a more confrontational stance against North Korea. He quickly became unpopular and divisive at home.