This just happened to me! My notifications randomly quit working out of the blue yesterday, and the "Allow notifications from iPhone" setting wasn't visible unless I searched for it.Sorry to inform you that it is simply part of the same bug. Your hunting it down and turning it on is unfortunately meaningless if you have the same issue as others (including myself) noted above. You'll find that it simply turns itself off again, most likely OR it says it's on but does nothing.
I also noticed that notifications were delayed on my iPhone (was waiting 7-10 seconds for my Okta Verify approvals). This was/is a known issue with the "Summarize Notifications" (previously called "Summarize Previews") setting on the iPhone. I turned that setting off and back on, and notifications were coming through instantly on my iPhone again. I then restarted the Mac, and the "Allow notifications from iPhone" setting shows up again and notifications are now working there as well.
BTW, I upgraded to macOS 15.3.1 and iOS 18.3.1 right after they were released a couple of weeks ago, and things were working fine then. Both of these just quit working for no rhyme or reason yesterday. I'm not sure if these are two independent issues and that simply restarting the Mac would have fixed the notifications there, or if these two settings are interlinked somehow and turning "Summarize Notifications" off/on on the iPhone (to fix the delay) and restarting the Mac is the actual fix.