The economic system you are referring to is commonly known as a command economy.
A command economy, often associated with socialist and communist ideologies, is characterized by the government controlling all aspects of economic production and distribution. In this system, the state makes decisions about what goods and services are produced, how they are produced, and who gets them, usually with the intention of achieving equitable distribution of resources and eliminating class distinctions.
This centralized decision-making can sometimes lead to inefficiencies, as the government may not have the same market signals or competitive pressures that drive decisions in market economies. As a result, while a command economy aims for equality and social welfare, it may struggle with resource allocation and innovation.