To write a compelling Injustice 2 fanfiction with guest characters, start by choosing the right guest character. If you pick someone like the Ninja Turtles, you can play on their camaraderie. Have them form an alliance with some of the Injustice 2 heroes who share their values. Then, build a plot around their mission. Maybe they're after a powerful artifact that a villain in Injustice 2 also wants. You also need to give the guest characters growth. Let them learn from the experiences in the Injustice 2 universe and change in some way. For example, they could become more cynical about the state of the world in Injustice 2.
When writing a story with guest characters in Injustice 2 fanfiction, it's important to make the connection between the guest and the existing world believable. For a character like Spawn, you could say that the dark forces in the Injustice 2 world are somehow related to his own origin story. This gives him a reason to be there. Then, develop the relationships. Have the guest character interact with characters like Batman or Superman. Maybe they start as enemies but then find common ground. Also, don't be afraid to deviate from the norm. If you have a character like Ash Williams in the Injustice 2 world, let him use his unorthodox methods to solve problems and surprise the other characters.