According to Apple only the Mac mini 2020 and newer is compatible with Airplay from iPhone to MacOs. Bu today I discovered that I am able to do it from my iPhone 11 Pro to my Mac mini from 2018. Did this change?
You know what. After upgrading to macOS 12.3, this feature was removed. Now you can not find 'AirPlay Receiver' option on share settings. This is just ridiculous - Mac mini 2018 has the capacity to support this feature, but Apple deliberately banned it. Whatever, I feel deceived.