China has few allies because it doesn't commit to potential allies and sacrifices their interests for concessions from the West. North Korea is one example. China supported very painful sanctions on its ally instead of supporting them. Instead of complying with the American method of sanctions, China could have offered to station Chinese nukes there and put Chinese soldiers at the border with south Korea to give the North a security guarantee. At the same time, China should be increasing in North Korea and opening its markets to Korean products. Instead, the trade relationship with the US and South Korea take precedence over supporting an ally. The US does the opposite, it sacrifices its own wealth by damaging its trade relationship with China and supporting security in Japan and others
It's essentially the same problem with Iran. Every time Iran gets sanctioned, China uses this is an opportunity to sacrifice Iran to get less pressure from the US on itself. It should also be obvious that Iran is genuinely scared of being invaded or couped again, so sanctions won't change their mind on nuclearisation. China should give them a security guarantee strong enough that they don't need nuclear weapons anymore, not comply with American sanctions. As for trade and investment, there's more words than action and Chinese companies delay or pull out of Iran in response to American desires.
China attempted to court Venezuela but abandoned them when they experienced political trouble and American sanctions.
The relationship with Pakistan is positive, partially because Pakistan is already an accepted nuclear power and has a good enough relationship with the US. But Pakistan is a very poor country, close to being a failed state. And now that they're close to default, China is doing little. Why not formalise the relationship with a mutual defence treaty and give Pakistan better access to the Chinese market?
Finally, there's Russia. Again, China is using the situation economically to its own benefit. But there's little help in other areas even simple satellite data with plausible deniability. Of course Russia is responsible for this as well by starting an offensive war
Looking at these examples, why would a country like the Philippines choose China as an ally over the US? China will sanction them, comply with American sanctions, provide little help in security or trade if it has any cost in access to western markets and technology. The US has many faults, but they do stand by their (democratic) allies. That leaves China with countries that have no other option, like Saudi Arabia with its royal family or the military government of Myanmar and the kingdom of Thailand. But even these countries try to balance China and the west/India, because they know China will abandon them if the US launches a sanctions campaign against them
If you don't build up your allies economically, you end up with poor allies that can't help you much geopolitically. None of them will commit to China because China won't commit to them. You can argue that none of the potential allies are big enough to deserve a large country like China making a sacrifice for them, but the advertisement is not good for China.
What's most puzzling is that China is now getting sanctioned anyway by a united west and it's still not committing to its potential allies. Sure, buying Iranian oil and selling oil to North Korea might invite sanctions to come even faster, but they're coming anyway and building up your allies into another high tech country like South Korea would absolutely be worth it