So Mac it’s not required (like it isn’t for windows) but if you want to take advantage of the full OS it is.
iPhone pretty much is required. And I know google is pretty much required for android.
“Full MacOS” is available on your Mac w/o an Apple ID login...Apple ID is required for iCloud services like sync, iCloud Drive, etc..
Technically you don’t need an Apple ID for an iPhone either (just a SIM/phone #)...it just makes it more “tied in” to the Apple ecosystem of your other devices if you do enter it in..
You can “De-Google” your Android phone...takes some work:
https://www.tomsguide.com/features/i-tried-de-googled-android-again-heres-how-that-went
https://itsfoss.com/android-distributions-roms/