Newton studied at school and at the university, but he mostly taught himself by reading. (At his secondary school he certainly learned Latin,
Greek, the Bible and some arithmetic. In the universities, they mostly studied Aristotle at that time,
which has nothing to do with mathematics). Besides textbooks that existed at that time he mastered Euclid, and then Descartes. He also read Archimedes and Apollonius, and certainly the works of contemporary mathematicians which were published is Transactions of the Royal society, of which he was a member and later the president. There is a comprehensive discussion of his reading in various periods of his life in the book
Westfall, Never at rest.
It is based on a catalog of his personal library, which survives.
Newton certainly created a lot of modern mathematics, but he was aware of the whole enormous body of mathematics which already existed before him, and discoveries of his contemporaries. The list of all the "giants on whose shoulders he stood" would be too long.