Hello janmariec,
Thanks for asking the Apple Support Communities for help logging in to your Apple TV. It sounds like you are using two-factor authentication, but the code you are entering is not working to allow access. To get you signed in, I recommend that you go to your trusted Mac or iOS device, and disable two-factor authentication. Use this article for help: Two-factor authentication for Apple ID under the section titled "Can I turn off two-factor authentication after I’ve turned it on?".
Once it is disabled, you might need to restart your Apple TV, but then you can log in. You can re-enable two-factor authentication after your Apple TV is logged in if you desire. Use the same article provided above, section titled "Turn on two-factor authentication for your Apple ID".
Thanks again for checking out the Apple Support Communities. Have a great rest of your day.