There are a few reasons that Vietnam unified and Korea didn’t but really it boils down to the Cold War. In North Vietnam, the USSR backed the leader Ho Chi Mihh and in South Vietnam we backed Ngo Dien Diem (say his name 5 times fast). North Vietnam lead a push on south Vietnam and because of the policy of Containment that Truman set up some years prior they had to war with North Vietnam to prevent to spread of communism.
The the thing is though the South Vietnamese people didn’t like Ngo Dien Diem because he was very American (we put him in power because he was very assimilated in American culture) and Ho Chi Minh was LOVED by the Vietnamese people. A bit of backstory about Vietnam, they have been invaded so many different times by the Mongols, the French twice, and America was no different. Ho Chi Minh battled the French many times as a soldier and he gained the status of being a national hero.
So after WWII and the Soviets and America split Vietnam, the South Vietnamese people really wanted to unify with and that led to the Vietcong — America’s downfall in Vietnam. The Vietcong was a sudo-terrorist group and they used guerilla warfare America didn’t know how to fight against this and they weren’t exactly losing the war but they weren’t getting anywhere because they didn’t really know how to win, it was an objective-less war. This infuriated the American public and they hated the war more and more because US soldiers kept dying there and we were making no progress, near the end of the war more than 50% of the public was against the war this led to Nixon pulling out troops and shortly after North Vietnam launched their biggest offensive and South Vietnam fell and they unified as one communist country.
Korea is a different story. The North Korean government launched an attack on South Korea and South Korea was on the verge of collapse until the US came in because of containment again and with the help of the South Korean army the US pushed back the North Koreans back, so far back that China needed to step in and help the North Koreans, with Chinas help they pushed American and South Korean troops back to the 38th parallel where it all started ending the war in a stalemate and they never actually signed a peace treaty, just an armistice.
So in conclusion it wasn’t really a choice for them to unify or not they were forcefully unified against there will, it’s just because America won one war and lost the other