Okay gang, I need you to think a bit more critically than 'China Bad.' First, why was the term "debt collector" used? China lent money, now they're taking payments. Is that debt collecting, or just the second part of lending money? Is a mortgage lender a debt collector? That's a loaded term meant to give you a negative impression, cuz no one likes a debt collector except perhaps an American hospital.
Second, the countries agreed to the loans. Paying them back was expected and predictable. If payments can't be made, then the debt will be restructured, meaning the payment schedule will be modified so the debtor country can make payments.
Third, the money was often used to build a potentially money-making asset, like a port. If used correctly, the assest should pay for a decent chunk of the loan.
Forth, I see a lot of half baked comments like 'China will take the port back' or 'China will take the hospital.' You must first ask, with what will China take back an African port, or hospital, or whatever? They don't have the means. They're not going to park an aircraft carrier off the coast and drop bombs until the loan is repayed, because they can't. So what does China want? China doesn't want the fucking port, they want resources and friends with benefits.
China's basically going here's a loan, build a port to import goods for your people. Import from whoever you like, it's your port. Oh by the way we make the cheapest and best everything (cuz they do), we'd be happy to sell you whatever you want, like solar panels or EVs. We also need colbalt and the finest silicon sand to build you these awesome EVs and solar panels you want, so we'll buy that from your mines and use your cool new port to ship it. Here's the loan payment schedule. No payments for the first 5 years, then afterward you pay X per year for 20-30 years. Oh no, you're having trouble making payments? Well we benefit from you having that port too, so let's restructure that debt so your people don't revolt and get cozy with the US.
There's no fucking debt trap. That's just racist and moronic. 'Those sneaky Chinese tricked the backwards brown people with a loan they can't repay.' Plus you can't repossess a structure on the other side of the world without a credible threat of violence. China does not have the means. Economic coercion, sure, but the debtor agreed to that and they're not stupid.