Hello Mariecko,
Thank you for posting in the Apple Support Communities. We understand that you're having trouble logging into your iPhone, but you're not experiencing the same issue when logging into your Mac or PC computer. We're here to provide some assistance.
First, make sure that you're properly signed in to your iPhone. Signing in also signs you in to iCloud. Keep in mind that we recommend that everyone have only one Apple ID for all Apple devices and services. Here's more info on signing in:
Sign in with your Apple ID
From there, connect your iPhone to another reliable network, restart your iPhone, then try signing in again.
If this concern continues after taking the steps above, our resolution is to contact Apple Support directly. Depending on your region, you may be able to reach them here:
Get Support
We hope this information is useful. Kind regards.