How? The (US) charger's only got 2 pins so ground stays unconnected.
Apple sells a 3-pin extension cable
US Version: https://www.apple.com/shop/product/mw2n3ll/a/power-adapter-e...
I don't know if this link will work - https://www.chargerlab.com/wp-content/uploads/2022/06/202206... but that metal round pin thing is a ground; and the three-prong cable connects to it.
The extension cable they used to include in box with the computers, it has the third pin for the charger brick connector which is wired to ground
There are grounded duckheads for this purpose, e.g. https://amzn.to/4cnzuef (note out of stock. I guess your best bet is to use a UK duckhead, but half of those have a dummy ground...)
if you take the plug part from the brick you'll note that there's only two pins but the button-like thing is a ground
as noted in a sibling, the power adapter extension cable does plumb the ground through (https://www.apple.com/shop/product/mw2n3ll/a/power-adapter-e...)