Hi jaimecardoso22,
Please try resetting your network settings and try again. (Settings > Connections > More > Network settings reset.)
Could you tell me the brand and model of the WiFi router that has this problem?
Have you tried connecting to a different router?
Do other phones connected to this same WiFi have the same problem at the same time?
Please show us a screenshot of your WiFi information.
(Settings > Network & Internet > Wi-Fi > tap on the WiFi already connected to access Network info)