For some reason, in some versions of Alma Linux on AWS - specifically Alma Linux 9 install. It was also set in another place
sudo vi /etc/ssh/sshd_config.d/50-cloud-init.conf
change to: PasswordAuthentication yes
If you can't get others solutions above to work, just try to alter this file in addition to the others changes highlighted by others.