Another idea is a story where Spiderman discovers a young mutant who has powers similar to his own. He takes the mutant under his wing and tries to help them control their powers. This draws the attention of the X - Men, who want to bring the mutant to their school. Spiderman is hesitant because he doesn't fully trust the X - Men's methods, leading to a conflict between them.
A fun fanfic could involve a scenario where the X - Men and Spiderman are all accidentally transported to an alternate dimension. In this dimension, they have to work together to find a way back home. Along the way, they learn about each other's powers and personalities more deeply. Spiderman could teach some of the X - Men his acrobatic fighting style, and the X - Men could share their knowledge of mutant powers with him.
One idea could be that Spiderman gets caught in the middle of a conflict between the X - Men and one of their powerful enemies. Maybe Magneto is causing chaos in New York and Spiderman tries to stop him on his own at first, but then realizes he needs the X - Men's help. The X - Men, in turn, are initially skeptical of Spiderman but come to respect his skills.