When I purchased recently a few Raspberry Pi Zero 2W I was struggling to get the Wifi to connect. I reflashed the SD card several times using the Raspberry Pi Imager and each time it failed to connect.
After some searching on the internet I found the solution which required creating an additional file on the SD card (mounted it on a Linux machine, or connect directly to it).
Create the file /etc/modprode.d/brcmfmac.conf
with the following line:
options brcmfmac roamoff=1 feature_disable=0x82000
This disables the SAE (WPA3 related) and SWSUP (authentication offloading into the firmware), and fast roaming.
Once this is done and my Raspberry Pi Zero 2W reboot it finally connected to the wifi.