When Jiraiya recounts his first encounter with Nagato's Rinnegan, he explains that not only is the fabled eye a gift from the Sage of Six Paths allowing the possessor to master any jutsu as well as all five nature transformations with ease — he sees Nagato use these abilities firsthand. Therefore, with the Rinnegan, so too can Sasuke access all chakra natures in a way not seen since the Ōtsutsuki Clan was relegated to legend.
Sasuke starts off with fire and then lightning chakra nature. Those are fire, wind, lightning, earth, and water. It is possible to learn to use all chakra natures — legend has it that Hiruzen Sarutobi, Lord Third Hokage, knew all jutsu and could therefore use all chakra natures. Sasuke, possessing the Rinnegan, Sharingan, and already two natures, is therefore able to learn all natures much more quickly.