I started playing civilization vi. Spawned next to Gandhi... long story short there are no more prophets all my cities are Hindu and Gandhi is now gone by my hand. Now all sorts of other religions started pouring through the gates. Whenever I make apostles they come out Hindu. I am quite strong in military and advanced in science so I could just try to kill everyone and raze their cities, but then my cities will become majority at some point. Will this make Gandhi win? Or my religion is now Hinduism and this is ok?
You can't win with an appropriated religion. It has to be the religion founded by your own Civ. If the Civ that has founded a particular religion is eliminated, that religion is ineligible for victory.
According to Civilization VI associate producer Sarah Darney:
Once you wipe out a civilization that founded a religion, that religion still exists. It does exist on the map, but that religion is not going to win the religious victory.