Why can't I log in to iCloud?

When I try to sign in to iCloud in iPhone 8 Simulator, I get an error saying that the user name or passord is incorrect. I am sure it is correct. I tried it with two different accounts. I am able to use the two Apple IDs to sign in to Apple.com.

Why can't I log in to iCloud?
 
 
Q