I have an S20+ and a WiFi 6 home network. I'm running the May 2023 update to OneUI 5.1.
Suddenly last night I was unable to connect to my home WiFi network. WiFi worked fine for all my other devices. I did lots of Google searches.... After trying all the obvious simple things (toggling Airplane Mode, Rebooting the phone, etc.), I looked in the S20+ Settings / Developer Options this morning and found ***''"WiFi non-persistent MAC randomization" and turned it ON.''*** WiFi almost instantly started working again on the phone.
I hope this helps others.
Cheers,[br]
Scott.