They are both low-level APIs relative to OpenGL. The difference is mostly that Metal doesn't expose GPU vendor details.
Metal has sort of been ported to other platforms, WebGPU is almost a subset of it (albeit somewhat higher level). There's even wgpu to use it outside of a browser.