Perhaps he has lost all hope. After facing so many hardships and losses, he may feel that there's no point in going on. He might see giving up his heart as an escape from the pain and suffering he has endured. In the fanfic, he could have witnessed the destruction of his village again and just couldn't bear it any more.
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.
It could be due to a physical or mental injury. If Naruto got seriously injured during the Chunin Exam, and he didn't think he could recover in time to compete effectively, he might give up. Mentally, if he was somehow affected by a genjutsu that made him lose his confidence or will to fight, that could also lead to his decision to give up.
The story could take a dark turn. Without his heart, Naruto might become a soulless being, and his friends would be devastated. They might try to find a way to get his heart back. Maybe they search for a powerful sage or some ancient magic that could reverse what has been done.
One possible reason could be that he experiences a great personal loss. Maybe he loses someone very dear to him during a mission, like his best friend or a respected mentor. This loss makes him question the whole ninja life and all the violence and danger it entails, leading him to give it up.
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.
Perhaps after facing too much betrayal from the village he loves. If the villagers turned on him despite all his efforts to protect them, it might lead him to close his heart in self - defense, not wanting to be hurt again. He's always tried so hard to gain their acceptance and if that was all for naught, it would be a huge blow.
It could also be due to the constant pressure and expectations on him. He's always had to be the hero, the one to save the village. If he feels he's constantly failing or not living up to those expectations, he may close his heart to protect himself from that self - doubt and disappointment. In the fanfic, perhaps there are new threats to the village that he feels he can't handle, and this leads to him shutting down emotionally.
One possible reason could be that Naruto has finally realized that Sasuke has chosen a path too far gone from their village's values. Maybe he feels that Sasuke has caused too much pain and destruction, and bringing him back would not be fair to all those who have suffered because of Sasuke's actions.
One possible reason could be a sign of extreme loyalty and friendship. Naruto might see Yang in a dire situation where she needs his arm for some crucial purpose, like to complete a powerful jutsu or to defend against an overwhelming enemy. He is known for his selfless nature, so sacrificing his arm would be in line with his character.
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.
If Naruto gives up on his friends in a fanfic, it would be a huge departure from his character. Naruto is known for his unwavering loyalty. His friends are his strength. Without them, he might become a much darker and more isolated character. He could lose his drive to become Hokage as his friends were a big part of that motivation. Also, the village that values friendship and bonds might see him in a different light, and he could face a lot of ostracism.