If (for example on codepen) you're having trouble instantiating web workers across origins, try this workaround:
import Box2DFactory from 'box2d3-wasm';
const box2d = await Box2DFactory({
loadWorkerViaBlob: true
});
it will load the js cross-origin, create a blob URL for it, then instantiate the blob same-origin. this may help you work around the lack of COOP/COEP response headers, provided you can at least retrieve the asset cross-origin (which CDNs are likely to support).