Boycotts do nothing. Ranting at companies trying to do business in the world's biggest market does nothing.
A multilateral embargo and military action against China would do something useful. If you destroy the world's biggest market, foreign companies won't be tempted to do business there.
Military action does not necessarily mean direct conflict. It can include such things as military projection, like placing additional forces in neighboring friendly countries.
The threat of nuclear armaments is another question entirely, one that needs careful evaluation. It's still possible to have a cold war - or even a hot war- with purely conventional weapons.
Now would be a great time for the US to antagonize the Chinese navy - their military is being stretched by being deployed into Kazakhstan and as reinforcements for Hong Kong police. They are weakened already, great opportunity to reassert their lack of sovereignty over some of the south pacific islands they've been gradually calling their own.
"Military action" here specifically refers to a buildup of precautionary forces in close proximity to China. The mere presence of those forces would give China pause.
Of course, if we wait too long to do so, then a buildup like that would only provoke China, not contain it.
A multilateral embargo and military action against China would do something useful. If you destroy the world's biggest market, foreign companies won't be tempted to do business there.