You should create a new custom message:
[https://learn.microsoft.com/en-us/powershell/module/exchange/new-systemmessage?view=exchange-ps
New-SystemMessage -QuotaMessageType WarningMailbox -Language en -Text "Your mailbox has exceeded the warning limit specified by your email administrator. Please reduce the size of your mailbox."
To test, you could use a test mailbox and set the quota on it very low and add emails with large attachments...