So I am trying to get into iCloud on my Apple TV3, but no success when I input the two-factor codes.
iCloud is no longer supported on the 3rd generation model. iCloud has changed, and the Apple TV software for this model hasn’t adapted with it. Just skip iCloud, and use the remaining functionality. iCloud isn’t needed for AirPlay. Also see: discussions.apple.com/thread/255664587.
I saw on my iPhone under the devices registered to my account that the Apple TV3 cannot receive codes.
For signing in for the iTunes Store, verification codes for two-factor authentication can be entered into the password field, right after the password itself. See here for details: discussions.apple.com/thread/251787405. (Please let us know if that still works in 2024.)
Verification codes can be send to iPhone, iPad, iPod touch, Mac, Apple Watch, (not sure about Vision Pro,) or phone numbers. I don’t think any model Apple TV box will be used as the secondary device to receive the codes on. You still may need to enter the code there.
After signing in, verify if it says “Activation: Failed” in Settings﹥General﹥About﹥. If that happened, then consider resetting and setting up again. Else try the workaround as suggested by user RKG61: discussions.apple.com/thread/253315520. As long as it says “Activation: Failed”, then AirPlay wouldn’t be available.