As per the official raspberry blog at https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022 the default username pi and password raspberry will no longer be allowed for headless login.
So, even if you have put the ssh file in /boot and used wpa_supplicant.conf setup to connect to your wifi network, you will no longer be able to directly ssh login to headless rpi using the default user and password.

Maybe this is a good thing but I don't think it is necessary, however, unfortunately not all users understand the security concerns of changing the default user and password ... fucking newbie leads to complicated unnecessary things.

To work around this, there are two ways to configure the default user and password for the headless rpi configuration:

  • Using RPi writer advanced config setup

The Raspberry Pi Imager tool allows you to preconfigure an image with a user account. During chosen the source image and destination in Imager, click the “settings” button and use the Advanced options menu to provide a username and password, as well as any other preconfiguration you desire.

  • Using userconf file

I go this way. Put the userconf file in /boot with the following contents :

username:passwordhash

To generate password hash you can easily use openssl command :

openssl passwd -6

Now, I can login again to headless rpi without issue.