Why does China invest in peaceful commercial agreements (like Belt and road, which is still active btw) while the US invests in global military control?
China was able to export its goods to the rest of the world using ships. Those ships sailed mostly safe seas (yeah there are exceptions like the Malacca Straits, where pirates still lurk) without any Chinese navy protection, because those seas were made safe by someone else. That is not hard to understand.
If the global trade as a whole is protected by the US Navy, Chinese trade, a subset thereof, is protected as well.
BTW The US does not have global military control. They do have quite a lot of control of the seas, but dry land is a different story. They had to withdraw from Afghanistan after trying to impose their will for 20 years. They didn't succeed in remaking Iraq to their ally either. And, in the steppes of Ukraine, a war has been raging for almost two years by now, with no end in sight - obviously not "in control" of the US, not least because one of the combatants is a major nuclear power and you cannot have any meaningful military control over a major nuclear power.
The US took over from the British as the power that protects global trade networks, which means patrolling the seas. The capability and willingness to do so attracted a lot of other developed nations into the US-led political coalition, and contributed to enormous growth of international trade (something like 5-fold since the 1970s?)
Without enough of a Navy, this network will disintegrate, or will be taken over by someone else, much like in the UK-to-US case around the time of WWII. Realistically, the only nation capable of doing so is China and I am not even certain if they wanted to, as their international projects like Belt-and-road are being abandoned.