To start writing a sanji crossover fanfiction, begin by brainstorming unique scenarios. Consider Sanji's personality, his love for food and his loyalty. If you're crossing him over with 'My Hero Academia', you could have Sanji be mistaken for a villain at first because of his flamboyant style. Then, as he shows his good heart through his cooking and helping the heroes in training, he becomes an ally. Outline the story structure, including the introduction, rising action, climax and resolution, and don't forget to make Sanji's actions and decisions true to his character.
One way to start is to study both the 'One Piece' world where Sanji comes from and the world he's crossing over to. Let's say it's a crossover with 'Fairy Tail'. Know the magic system in 'Fairy Tail' and figure out how Sanji could either be immune to certain magics or find ways to use his cooking to counter them. Create an interesting hook at the beginning, like Sanji waking up in the middle of Magnolia town with no idea how he got there. Then build the story from there, making sure to keep Sanji's character consistent while also allowing him to grow in the new environment.