To do QML profiling, you need to import QQmlDebuggingEnabler from PySide6.QtQml, instantiate a QQmlDebuggingEnabler sometime before the QML engine is instantiated. (I do it before QApplication is created), and have -qmljsdebugger=port:<some port>, block passed as an argument to QApplication:
from PySide6.QtQml import QQmlDebuggingEnabler
[...]
sys.argv.append("-qmljsdebugger=port:10002, block")
app = QApplication(sys.argv)
[...]
debugEnabler = QQmlDebuggingEnabler() # pylint: disable=unused-variable
engine = QQmlApplicationEngine()
Once you have that and you start your app, it will wait for the QML debugger or profiler to connect.
Open Qt Creator, Choose "Analyze->QML Profiler (Attach to Waiting Application)", make sure that the kit that is selected matches the PySide6 version that you are using, specify the same port you specified in the app, and then click "Ok". Your app should start up, and you can interact with it.
Back in Qt Creator the profiler panel will have opened, and it will look like no sampling is being done, but it actually is. There is a red circle tool button that I think is supposed to look like a recording light indicating that sampling is happening. Go back to your app and do whatever actions that you wish to profile, and when you're done and ready to look at the results, go back to Qt Creator and click the red "recording" tool button and it will stop sampling, and should show you some results.
I'm still getting a feel for how to actually use the results that it provides to do optimizations.