Hi,
What did you upgrade from? OSX? Logic?
What is your MIDI interface?
What MIDI devices are connected?
There have been lots of issues with legacy MIDI drivers, devices and interfaces with the move to Catalina ( 64bit ) and Big Sur. Check with your MIDI vendor support and confirm support for your version of OSX for your device(s). This is a critical first step since the onus is on the Third party vendor to support OSX and many are lagging.
Here are a couple general housekeeping suggestions to start:
1) Make sure all your plugins (soft instruments, processing) fully support your version of OSX (and M1 hardware if applicable) and are up to date. Lots of legacy issues are causing lots of headaches and some started with Catalina. Critical: Remove and delete any Audio devices in the Apple Audio Midi Setup and uninstall any that are not valid.
2) Same for any MIDI devices ( keyboards, controllers, adapters or interfaces). Make sure all your devices fully support your version of OSX and are up to date. Remove and delete any MIDI devices in Logic ( Controllers ), in the Apple Audio Midi Setup and uninstall any drivers that are not valid.
I have seen an uptick with Midis Issue with since Logic 10.5 and here are my observations and tips:
1) Make sure ALL drivers are current and fully supported (Critical )
2) No USB hubs in the data chain to MIDI devices
3) Always start from a cold boot, no wake from sleep
4) No changing of accounts ( logout / login )
5) If using a combination of USB and a MIDI multi-port interface leave Port A open on the multi-port.
These steps solved about 99% of my ( and fellow musicians ) MIDI issues.
Hope this helps
( If this was helpful please mark as such or mark as solved if that is the case )