The main reason was the Spanish spread themselves too thin by conquering too many islands that were too far apart.
New Spain was then vast. It included colonies in islands of the Carribbean, Mexico,Central and South America, and parts of what is today America.
Spain had to spend to send armada throughout these. With seven thousand islands in the Philippines alone, they also needed to send supplies and soldiers to the far away Mariana Islands of Micronesia, which took about seven to ten months to get to from Manila.