Yes, they certainly could have done things sooner, not silenced their doctors as whistleblowers, and more readily shared earlier warnings of how bad things were. But let's be real. If the US were in China's position, there would be cries of authoritarian lockdowns limiting rights to human movement and travel, etc. And as we have had ample proof, the US attempted to silence doctors as whisteblowers for months afterwards. And there is zero chance the US could have kept it in their borders.
So it's a bit disingenuous to see Western nations point fingers as if a) they would have any shot at preventing it from getting out (especially when, compared with China, they are nowhere close to controlling it a year later even with vaccines available), and b) they would clamp down on their citizens and isolate them immediately to prevent spillover to neighboring countries.
This has basically become an international game of "who farted?"