Thanks for the details—I can help you get unstuck.
Your Mac is likely asking for one of two things. If it says “Verification Code” or “Two-Factor Authentication,” that’s an Apple ID code normally sent to your iPhone. Since you don’t have the iPhone, you can generate a code on the Mac itself: Apple menu > System Settings > your name > Sign-In & Security > Get Verification Code. If that isn’t available, choose “Didn’t get a code?” in the prompt and send it to your trusted phone number via text or call. If you no longer have a trusted number, go to iforgot.apple.com to start account recovery.
If the prompt says “Enter Passcode for ‘[iPhone name]’,” that is the old iPhone’s device passcode used to approve end-to-end encrypted iCloud data (like Keychain). If you don’t have that passcode or device, click “Can’t use this device?” (or similar) and choose “Reset Encrypted Data.” This lets you finish signing in without that iPhone. It removes the iCloud copy of items like Keychain; your local passwords stay, and you can re-enable Keychain later.
If System Settings is frozen in a loop, sign out of Apple ID on the Mac (System Settings > your name > Sign Out), restart the Mac, then sign back in and use the steps above. Also make sure Date & Time is set automatically and try the sign-in on a plain network (no VPN or filter) just for the setup.
Tell me exactly what the prompt’s wording is (“Verification code” vs “iPhone passcode”), and I’ll give you the exact next taps.