The two answers by James K and QuantumWalnut are good, but I believe that they miss some relevant points.
Despite the UN, there is no such thing as a world government. There is no effective world court, either. Nations are mostly assumed to be sovereign in the Westphalian model, and concepts like the Responsibility to Protect are only slowly making inroads. There is no global requirement for countries to be democratic, and for much of the 20th century there were major, non-democratic powers like the Soviet Union.
What does exist are groups of countries which affirm common standards on democracy and human rights. The Soviet Union signed up to some of them, like the Helsinki Accords. Groups like the Organization for Security and Cooperation in Europe are sending election monitors to many states.
Here is the initial OSCE report on the 2020 US elections. Here is the final OSCE report on the 2017 German elections. As you can see, both are somewhat critical. Here is the final report on the 2018 Russian Presidential elections. Compare the tone of the recommendations in this case. And there was no invitation to Belarus 2020.
There is no requirement to accept OSCE monitors and similar groups. A country which fails to do so is still sovereign. But it would lose "face" in the international community at large.
And then there is the debate among political thinkers about if and when there is a right of revolution. Some argue that populations (or individuals?) have the right to overthrow a non-democratic government, while in a democracy they must limit their campaigns to the ballot box. Democracies might be unwilling to extradite revolutionaries to non-democracies.
Countries are also free to offer preferential trade deals and things like visa rules to other countries they approve, and to deny them to countries they disapprove. And having the same views on democracy tends to cause mutual approval. Compare the EU rule of law conditionality.