As for Spain's history... they were never a key player in the scientific revolution/enlightenment.
View attachment 95126
The above chart is from Charles Murray's Human Accomplishment. Italy was a central player but Spain was on the periphery. I never understood why they underperformed Italians so much in science, arts, technology etc. They industrialised much later than Italy, even today they are poorer. But I suppose that's another topic for another thread
I was purely looking at it from the standpoint of China, where Ming China till the end of Qing benefited to some degree from the trade with Spain in the form of silver from Zacatecas and Potosi silver mines.
Whatever manufacturing and industries Spain had, the practical basis of science and innovation, during Industrial Revolution were completely destroyed by the invading French in Napoleonic war, who were again outdone by the English, allies of Spain no less. English made it sure there was nothing left that could later compete with them.
The legacy of Spanish silver is today's symbol of dollar sing $. The two pillars on the real de a ocho, wrapped around in plus ultra, was where the symbol came from. It's very notable how England destroyed Spanish industries as an ally, not very different from what modern day US is trying to do to Chinese industries.