I have a Compose key binding in https://github.com/kragen/xcompose which maps Compose Space Minus to "—" with two thin spaces on each side of it, because I prefer the spaces. But HN rewrites the thin spaces to regular spaces, so on HN I just use "—" without the spaces, the way ChatGPT does, which is Compose Minus Minus Minus, and is in the standard Compose key bindings (if you map your keyboard to have a Compose key at all).
Examples within the last week include https://news.ycombinator.com/item?id=44996702, https://news.ycombinator.com/item?id=44989129, https://news.ycombinator.com/item?id=44991769, https://news.ycombinator.com/item?id=44989444. I typed all of those.
I never use space-hyphen-space instead of an em dash. I do sometimes use TeX's " --- ".