Hi,
Welcome to share here!
To configure Windows Active Directory account password expiry email notification to end users, we need to run a script.
Below is a script that can identify Active Directory accounts that are about to expire and sends a mail notification to the end users. It optionally allows sending the applied Password Policy settings which make easier for users to choose a new password that meets the company requirements.
If you don't want to run the script manually, you may consider running it regularly by configure a schedule task.
For more details, you can refer to the following links:
Notify Active Directory Users about Password Expiry using PowerShell
How to Setup a Password Expiration Notification Email Solution