It's possible that the Sage of Six Paths has some sort of plan from the afterlife. He manipulates events so that Pein's Rinnegan goes to Naruto. This could be because the Sage foresees a great threat to the ninja world and believes Naruto with the Rinnegan can be the savior. The transfer might occur during a spiritual encounter between Naruto and Pein, where the Sage's influence is at work.
In some fanfiction concepts, there could be a spiritual or mental connection established between Naruto and Nagato. Since Naruto has this unique ability to understand and connect with people on a deep level. Through this connection, Nagato might pass on the power of the Rinnegan to Naruto. It could be like a transfer of not just the physical power but also the knowledge and understanding that comes with the Rinnegan.
Perhaps in the fanfic, Pein gives Naruto the Rinnegan to create a balance of power. With the Rinnegan, Naruto might face new enemies who are after this powerful dojutsu. He would then have to use his newfound power, along with his existing skills like Sage Mode and Rasengan, to protect his friends and the village. The story could also explore how Naruto's view of the world changes with this new power.
One possible plotline could be Naruto trying to understand Pein's ideology. He might start to study the reasons behind Pein's actions in the Akatsuki. For example, Naruto could explore Pein's concept of peace through pain. He might try to find common ground between his own beliefs of peace and Pein's, which would lead to some intense internal and external conflicts within the story.
In a fanfiction, Naruto might obtain the Rinnegan and Sharingan through a unique encounter. For example, he could stumble upon a dying Uchiha who transfers his Sharingan to Naruto in a moment of desperation. As for the Rinnegan, it could be related to his connection with the Sage of Six Paths. Perhaps the Sage's spirit, seeing the great need in the ninja world, bestows the Rinnegan upon Naruto. It could also be a result of some sort of genetic experimentation gone wrong but in a way that gives him these powerful eyes instead of harming him.
It could also be a situation where Naruto's connection to Hagoromo is deepened in the fanfiction. For instance, Naruto might have a vision or a spiritual encounter with Hagoromo. During this encounter, Hagoromo realizes that Naruto is the key to bringing true peace to the ninja world. So, he imparts the power of the Rinnegan to Naruto to help him achieve this grand goal. This would be a more complex and involved process, perhaps involving Naruto learning about Hagoromo's past and his own role in the grand scheme of things.
One possibility is that there was some sort of spiritual or chakra - based connection between Naruto and Nagato. Nagato, being the possessor of the Rinnegan, recognized Naruto's strong will and the fact that he was on a path to change the ninja world for the better. Through this connection, Nagato was able to transfer the power of the Rinnegan to Naruto. It could also be related to the nature of the Sage of Six Paths' power that was somehow involved in this transfer, as both Naruto and Nagato were related to the Sage in different ways.
In some fanfictions, it could be through a strange and powerful jutsu transfer. Maybe Madara, on the verge of defeat, decides to transfer his Rinnegan power to Naruto for some unforeseen reason, like seeing a new path for the ninja world in Naruto.
In such a fanfic, one way could be through some form of power transfer from a character who already has the Rinnegan. For example, if there's a situation where Nagato decides to transfer his power to Naruto before his death. Another possibility is that Naruto discovers an ancient and forgotten jutsu that can grant him the Rinnegan.
In some fanfiction concepts, the chakra of the Kyuubi is not just pure fox chakra but also contains remnants of the Sage of Six Paths' power. Since the Rinnegan is related to the Sage of Six Paths, when Naruto reaches a certain level of power and harmony with the Kyuubi, the dormant Rinnegan - like power within the Kyuubi's chakra awakens in Naruto. This could be a result of Naruto's strong will and his journey to master the Kyuubi's power which eventually leads to him obtaining the Rinnegan.
The plot could take a turn where Naruto is hunted by those who want the Rinnegan for themselves. Orochimaru might be very interested in Naruto's new power. Also, other villages might see Naruto as a threat. This would force Naruto to either hide his power or use it to assert his dominance. It could also change his relationship with Sasuke, as Sasuke has his own power goals, and Naruto's Rinnegan might either make Sasuke more competitive or more willing to team up with Naruto.