Well, Harry Styles has a very distinct personality and image. In fan fictions like 'The idea of you', fans can delve deeper into aspects of his character that they find fascinating. It could be his sense of style, his music - inspired storylines, or his rumored relationships. Writers can take these elements and spin them into engaging stories, which attracts a lot of readers. And the community aspect also plays a role. Fans can discuss these fan fictions, share their favorite parts, and that creates a buzz around it.
Twilight has nothing to do with Harry Styles fanfics. It was created by Stephenie Meyer as an independent novel series with its own unique story and characters.
It could be trending because it features a new take on Harry Styles' personality or it offers a fantasy storyline that fans haven't seen before. Also, good promotion and word-of-mouth can contribute to its popularity.