> Long press on - on both iOS and android (Gboard)
Depending on the text area you are typing into, if you type two hyphens/minuses right after each other (no spaces), Apple systems often translate them to an em-dash (kind of mimicking (La)TeX).
(If you don't want the em-dash, hit <cmd-z> with macOS to undo that auto-conversion.)