As far as I know, when borrowing debt, they also take GDP (gross domestic gross) into account. when the debt is still below the GDP owned by a country, the debt is safe. If you look at the list, many large countries have debt, because they of course have a development agenda that must be carried out immediately so that in the long term it can be useful for their society. However, if income does not match debt then a crisis could occur in that country. I am also not an economist, but in general, debt is needed to encourage the acceleration of policies to improve the welfare of the people.
It's really difficult, when most people hear the name "debt" they think negatively. We have long been taught that "debt" or borrowing money is a bad thing, even though "debt" to a country is not that narrow.
State debt is always measured by results called ICOR. the extent of the benefits/results from the debt. If there is a loss, there must be a mistake in targeting development or there has been corruption.
This means that state debt is not always negative, if the debt is used appropriately and carefully and there is supervision.
If the state is corrupt, weak and the debt is used for political costs, subsidies and is used only to cover shortfalls in state spending or to cover shortfalls in the state budget, let alone debts abroad in the form of foreign currency.
This kind of debt is very dangerous and deserves to be discussed by the people.