With a yarn upgrade the library won't load the wasm but tries to load the mjs files. When moving back to onnxruntime 1.18.0 in the yarn.lock it works again.
I found with onnxruntime version 1.19.2 you just needed to also copy the node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.mjs file to wherever you're copying the wasm file and then it worked fine.
With a yarn upgrade the library won't load the wasm but tries to load the mjs files. When moving back to onnxruntime 1.18.0 in the yarn.lock it works again.