S. Korea had essentially no effective army when the North invaded. The US had done very little to turn them into an army. Over the course of the war they were trained and eventually became a formidable force. They fought in Vietnam quite successfully.
After we pulled our troops out of Vietnam, the South successfully squashed the first invasion by the North.
Over the course of the next year, the US Congress abandoned S. Vietnam in the aftermath of Watergate, demoralizing them. The next Northern offensive succeeded.
Thank you for your succinct, concise, accurate, and rational summary of those two conflicts..