Hello,
maybe this article will help you further:
Set the password expiration policy for your organization
https://learn.microsoft.com/en-us/microsoft-365/admin/manage/set-password-expiration-policy?view=o365-worldwide
Hope this helps with your query!
-------
--If the reply is helpful, please Upvote and Accept as answer--