A systematic compilation of set of rules to run the government of a country is known as the constitution of the country.
A Constitution is required for every country to function properly. Without a Constitution, it is impossible to imagine how a country is run. It establishes a country's values and the nature of the political system.
For instance, it tells the kind of country's government, whether democratic or not. The Constitution regulates the country's administration. It also informs elected representatives what they can or cannot do.