When UsePAM is set to "yes", PAM runs through account and session types properly. This is important when restricted access to services based off of IP, time, or other factors of the account is needed. Additionally, this ensures users can inherit certain environment variables on login or disallow access to the server.
Check
Verify the RHEL 9 SSHD is configured to allow for the UsePAM interface with the following command: