It could also be due to a misunderstanding. Some false information might have spread in the fanfic's world, making Naruto believe that everyone has turned their backs on him. Like, some bad guys framed his friends, and Naruto, being unable to see through the lies at first, gives up on everyone in despair.
Maybe Naruto gets tired of always chasing after Sasuke. He has his own life and dreams too. He might think that he has sacrificed enough of his time and energy on Sasuke, and it's time to focus on himself and the village. He could start to believe that Sasuke has made his own choices and he can't keep forcing Sasuke to come back.
Well, it makes him more cynical. Normally, Naruto is a very positive and hopeful character. But in this fanfic, giving up on everyone would turn him into someone who doubts the goodness of people. He would become more withdrawn and less likely to reach out to others.
One possible reason could be that Naruto realizes Sakura's true feelings for Sasuke are unwavering. After many attempts to win her heart, he might come to the conclusion that he's just chasing after someone who will never love him back. So, he decides to give up and focus on other aspects of his life, like his ninja duties or his friendships with other people in the village.
One possible reason could be that he experiences a great loss, like the death of a dear friend. This might shatter his confidence and make him lose his passion for being a ninja.
One reason could be the sacrifices he has to make for the village. Naruto is so dedicated to protecting Konoha that he might feel he doesn't have time for love. His responsibilities as Hokage are immense, and he has to constantly be on guard against threats. Another reason could be past traumas. He has lost many people he cared about, like Jiraiya. This could make him afraid of getting close to someone again and losing them, so he gives up on love.
Another factor could be the nature of his ninja life. It's full of uncertainties and risks. He may worry that if he falls in love, his loved one could become a target for his enemies. Naruto has made many enemies over the years, and he wouldn't want to put someone he loves in danger, so he decides to give up on love.
One possible reason could be to protect his friends. He might think that by sacrificing his heart, some great danger or enemy would be vanquished, thus ensuring the safety of those he cares about. For example, if there was a powerful curse that could only be broken by his heart's sacrifice.
One reason could be exhaustion. Naruto has been through a lot in the original story. In a fanfic, if he is continuously put through more and more difficult situations without proper breaks, he might just give up out of sheer tiredness.
One possible reason could be a series of misunderstandings. Maybe his family made decisions that he felt were against his principles or dreams, and after repeated attempts to reconcile the differences, he just lost hope. For example, if his family was against his ninja way, which is such a core part of his identity.
One reason could be the constant setbacks he faces. He might feel that no matter how hard he tries, he can't achieve his goal. For example, if he fails too many times in battles against strong opponents, he could lose hope. Another reason might be the loss of important people in his life. If someone like Iruka or Kakashi, who have been his pillars of support, were to die, it could shatter his dreams as they are so closely tied to his will to succeed for their sake.