iCloud Sever Name?

I’m trying to connect to my iCloud account however I’m not sure what my “server name” is?
If I enter my iCloud credentials, I get an error message. What am I missing?

IMAP: imap.mail.me.com
SMTP: smtp.mail.me.com
CardDAV: https://contacts.icloud.com/
CalDAV: https://caldav.icloud.com/.well-known/caldav

User name: your iCloud email address
Password: the app password you created for this purpose.