Firewall is blocking Screen Sharing
I haven't had problems with Screen Sharing until I bought my M1 Mac Mini. It's only about a week old, and I updated it to 12.4 as soon as I plugged it in and turned it on for the first time. I can screen share with my 2015 MacBook Pro running 12.4, and I can Screen Share with my iMac running High Sierra. When I turn off the built-in software firewall, Screen Sharing works. However, the firewall should not be blocking Screen Sharing. I compared the firewall setting on my Mac Mini with the settings on my MacBook Pro, and they are the same. Both allow incoming connections for Screen Sharing. File Sharing works on my Mac Mini when the firewall is turned on.
I just got off the phone with Apple support, and they didn't have any idea why this is happening. A search on DuckDuckGo brought me to this community because I saw at least 2 other people are having this problem with their M1 Macs.