Vietnam was indeed a vassal state of China for about a millennium, up until around the 10th century.
That part of history has produced some bad feelings between the two countries over the years, not unlike any area that achieves independence from a long-standing mother country.
However, the Chinese haven’t helped the relationship much.
The derogatory term Annam is still sometimes used by the Chinese when referring to Vietnam.
It means “the pacified South,” implying a connection to China, despite their longstanding millennium of separation.
Vietnam gained its independence and separated from China in AD 938 after their victory at the battle of Bạch Đằng River.