I think wxPython is not supported full for Python 3.11 and I researched about it. I got python 3.11 is not supported to wPython and we better to use Python 3.9.
You can install wxPython from the Fedora repositories (and it works with Python 3.11):
dnf install python3-wxpython4