That’s a tough question – you have my sympathy. Like you, I stopped for a while. I got sick, and the drugs really messed with my ability to put pen to paper. I mean, I could write, but it was utter crap.
And then one day I started again. I typically advise writers to avoid fan fiction these days. There’s just too much baggage involved. But I saw something and it really annoyed me. I could write a better scene, a better character… and so I did. I just gave myself permission to do it. I considered it “practice”, nothing serious. Nothing real. But it was good. I really enjoyed it. It reminded me why I started writing in the first place.
THEN… I found Quora. There are so many good questions there! People are asking about things I know. So I started answering questions. Stretching my writing legs, so to speak. Remembering the flow of interacting with an audience, crafting my “writing voice” again. Remembering just how much fun it is to write regularly.
After that starting up a new novel was relatively easy. Bottom line – just get out of your own way. Give yourself permission to do it. Don’t worry if it sucks. In fact, don’t worry about anything. Sit down, zone out, and write.
You can do this. 😉