You’ll get a lot of opinions when you ask someone how far apart two antennas should be when stacking. Certainly if they are too close they are going to interfere with each other.
The most accurate number I’ve heard is “no closer than half the wavelength of the lowest channel either antenna will pick up.” That means that for a VHF antenna they should be 6 feet from each other, and with a UHF antenna at least 2.5 feet. The distance is the distance between the actual elements and not counting reflectors (like the white plastic-rimmed ones in the image above.)
However, these are guidelines. The most important thing is that you follow the “at least” part because what you’re trying to do here is avoid interference, and while these are good guidelines, they don’t always apply 100% to your situation. If you stack two antennas together and find that you’re getting weird interference or poor performance, separate them. Simple as that.