option+minus for en-dash – and shift+option+minus for em-dash —
This works on X11, I haven't tried on Wayland.
On Windows it works, too, by grabbing the "us - mac" layout and using the alt-gr for the mac's option. I think this is the layout I use: https://github.com/adunning/Mac-Keyboard-Layouts-for-Windows
option+minus for en-dash – and shift+option+minus for em-dash —