In a democracy, sovereignty is vested in the people. This means that ultimate authority and power reside with the citizens of the country, and they have the right to participate in the governance of their country through various means, such as voting in elections and holding their elected officials accountable.
In a democratic system, the government is created by and accountable to the people. The government is responsible for carrying out the will of the people and promoting their welfare. It is accountable to the people through regular elections and other mechanisms of democratic participation, such as public consultations and civic engagement.
While the legislature, judges, public officials, and the head of state all play important roles in the functioning of a democratic government, they are not the ultimate source of sovereignty. Rather, they are all subject to the will and authority of the people, who have the power to elect and remove them from office if they fail to serve the public interest. Therefore, the best answer is: the people.