Each Civ can have at most 1 of a National Wonder at a time. If you lose a National Wonder, you regain the ability to build that National Wonder again.
You could create a colony and the colony would get to keep any National Wonders, while you would free up your slots to be able to build each of the same National Wonders in another city.
It does not matter if it is a colony or a peace vassal or a capitulated vassal. They all count as a different civ and so their National Wonder ownership is independent from yours.
I am not sure about starting the game with teams or later forming permanent alliances, which may or may not act differently.
If you gift a city with a National Wonder in it and that Civ already has a copy of the National Wonder in another city, the gifted National Wonder will get erased.
You can gain a National Wonder through a culture flipped city but only if you do not already have a copy of that National Wonder in a different city.