All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
Islam says the same about capitalism as what it says about socialism; they are both man-made systems that include many ideas that are contrary to the provisions set by Allah to govern people's economic interactions. The Islamic legislation is the system that must govern such interactions; the One Who created is the One entitled to legislate; Allah, The Exalted, says (what means): {Unquestionably, His is the creation and the command; blessed is Allah, Lord of the worlds.} [Quran 7:54]
Ibn Katheer wrote, "The verse underlines that Allah, The Exalted, has the ultimate and sole control over all the affairs of His creation. Unquestionably, His is the creation and the command; just as He created them as He wills ... He governs them as He wills."
Hence, it is prohibited to adopt capitalism or socialism as a referential system because this falls under seeking the judgment of (the time of) Ignorance. Allah, The Exalted, says (what means): {Then is it the judgment of (the time of) ignorance they desire? But who is better than Allah in judgment for a people who are certain (in faith).} [Quran 5:50]
As-Sa‘di commented on the verse, saying:
"It means: Do they seek the judgment of the days of ignorance by turning away from you and ignoring you? Every judgment that opposes that which Allah has revealed to His Messenger is considered to be a 'judgment of the days of ignorance.' It is either the judgment of Allah and His Messenger or the judgment of the days of ignorance. Whoever turns away from the first will be tested with the second, which is based on ignorance, oppression, and injustice. That is why Allah, The Exalted, attributed it to the days of ignorance. As for the Judgment of Allah, it is based on knowledge, justice, light, and guidance..." [Tafseer As-Sa‘di]
For more benefit, please refer to fatwa 84670 about the Islamic economy and that it is moderate, between the two extremes of capitalism and socialism.
Allah knows best.