Because the North Vietnamese were not bombing and destroying American home soil schools, apartment blocks, utilities, etc. on a daily basis.
Lacking any real home soil peer citizen engagement the US saw the Vietnam War as a costly pointless loss of money, resources, and life on the far side of the planet.
The difference is, as the other comment points out, the Americans could have (and eventually did) leave South Vietnam any time they wanted with no negative consequences. It was a pure war of choice.
Everyone on the Ukranian side knows that their options are: victory, death, a deeply miserable time in a POW camp, or abandoning their life and becoming a refugee. Regardless of what your rank or social status is.
Different situation. The Americans were killing Vietnamese in Vietnam. There was a near unlimited number of those, including innocent ones.. The Ukrainians are killing Russian soldiers in Ukraine. There's a limited number and if they don't like it they could go back to Russia.
It's rough on the killed soldiers but that's really Putin's fault - I think he was basically the only one who wanted the war. Most Russians looked horrified.
Lacking any real home soil peer citizen engagement the US saw the Vietnam War as a costly pointless loss of money, resources, and life on the far side of the planet.
The Ukrainians are somewhat more engaged.