Enable Two-Factor Authentication for multiple Apple IDs on a single device
Yes. you can absolutely do that!
There are many reasons why you might have to do that. Some of you might use different Apple IDs for development work and personal use, while some would separate work and personal identities. Whatever the reason, it’s absolutely necessary to ensure all of those Apple IDs have Two-Factor Authentication enabled!
If you already have your account set up with the older Two-Step Verification, as was with my own Apple ID, the screenshot shows exactly how you can update it to the newer Two-Factor Authentication mode.
1. Go to the Passwords & Accounts section in Settings

02. Add an iCloud Account

03. Sign on with your other Apple ID’s email and password

04. Once you’re signed on, tap on your Apple ID to continue

05. Tap on Password & Security to update its configuration

06. Notice that my account has the older Two-Step Verification enabled. Tap on Update Account Security to continue.

07. Tap Continue to… continue

08. Voila. You should now have Two-Factor Authentication enabled! You can further protect the account by using a recovery key if you wish. Otherwise, you’re done! Go ahead and login with your Apple ID on https://appleid.apple.com and you should get the notice to allow the login on your device.
