Since I upgraded my iPhone 8 to iOS 16.4 (and then 16.4.1) I seem to have Wifi connection issues. At home it usually connects right away, but it either doesn’t connect to public networks or drops the connection almost randomly. iOS had this problem a couple of years ago, although I forgot which version that was.
On one public network I seem to have fixed it by playing around with the Wifi settings (i.e. “Ask to join Networks” and/or “Auto-join Hotspot”, but I am not on that network now, so cannot confirm). It seems that iOS 16.4 has changed that setting without asking me, as I didn’t have any problems for several years.