The character of Thanos gets defeated in the comics by a variety of factors and characters. It could be a powerful solo hero or a coordinated attack from a group of them.
Well, there are multiple instances and circumstances. It could be a combination of heroes or a single powerful character, depending on the specific comic arc.
One challenge is the complex and often dark nature of their relationship. Thanos is a villain who has done terrible things, including to Gamora herself. So, it's difficult to make their relationship believable in a positive or even a nuanced way.
Yes, there are likely fanfictions out there where Tony kills Thanos. The Marvel universe has a huge fan base, and fans often create alternative storylines. Some might explore this scenario to give a different take on the Infinity War and Endgame stories.
One consequence could be that Peter Quill Parker becomes a hero. People all over the universe might look up to him. But he may also face some jealousy or envy from other powerful beings.