Thanks for posting your question in the Microsoft Q&A forum.
It should be something like this:
$rule = "UserPasswordLastChangeDate -ge `" + (Get-Date).AddDays(-30).ToString("yyyy-MM-ddTHH:mm:ssZ") + "`"
New-AzureADMSGroup -DisplayName "Password Last Changed in Last 30 Days" -MailEnabled $false -SecurityEnabled $true -GroupTypes "DynamicMembership" -MembershipRule $rule -MembershipRuleProcessingState "On"
https://www.powershellcenter.com/2023/02/03/pwdlastset/
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **