Hello,
It could be legit, but never click the links in those messages to find out.
Instead, on a PC or phone, sign in to your Microsoft account the normal way you do for OneDrive or Outlook, not through the email.
- For OneDrive, open the OneDrive app, select the cloud icon near the clock, choose Settings > Account > Manage storage.
- For Outlook email, open Outlook in a browser, select the gear icon, choose View all Outlook settings, then General, then Storage.
If you really are at or near 100 percent, you will see it there and you can clean up files or buy more storage from that official screen. If your usage looks fine, the message you received is almost certainly phishing, so delete it.
If the warning you saw names OneDrive or your Outlook mailbox specifically, tell me which one and I will give you the exact clean up steps for that service.