Many devices and word processors will convert "--" into an em-dash. On longer posts, I often write in a word processor and then copy-paste to a text field.

On Android and iOS, you press and hold the "-" to get the "–" and "—" options.

On Mac, use opt + hyphen for "–" and opt + shift + hyphen for "—" (similar to other special characters).

On Linux you can enable the compose key and use it similar to MacOS (Compose+---).

It's not rocket science.