A family of Microsoft word processing software products for creating web, email, and print documents.
It looks like the automatic horizontal line feature in Word is disabled. The shortcuts (---, ===, ###, ~~~) only work when Border Lines is enabled in AutoFormat settings.
Please try:
Open Word → File → Options
Go to Proofing → AutoCorrect Options
Open AutoFormat As You Type
Under Apply as you type, enable Border Lines
Click OK and restart Word
If it is already enabled, try repairing Microsoft 365:
Settings → Apps → Installed apps → Microsoft 365 → Modify → Quick Repair
After that, test again with a blank document and type:
--- + Enter
It should create the horizontal line automatically.