The em dash (—) and the en dash (-) are two different symbols. The latter is on your keyboard; the former is not.
Using — is the red flag. Using - is normal.
Crocodile Dundee moment: That's not an en dash (-). That's an en dash (–).
This is how they look against each other and what they're used for.
| - | Compound words, continuation, phone numbers |
| – | Ranges A–Z, 24–72 |
| — | Set off thoughts—an aside—in writing |