JavaScriptCore and JS running in a web page using WKWebView are both running in the same app process and do not support WASM since they cannot generate code (cannot write to executable memory pages).
SFSafariViewController does support WASM by executing in a separate more privileged process but interaction with the app is very limited.