@91antoniolopez: Can you try heading to Settings > Connections > Wi-Fi > Tap the 3 dots in the top right > Wi-Fi Control History, and check to see if any apps have turned your Wi-Fi off. If you find anything that corresponds with your issue, and it is a third party app, then you may wish to uninstall it to prevent future occurrences.
Further to the above, please head to Settings > Connections > Data Usage > Mobile Data Only Apps, and either toggle this option off, or remove any apps that you use frequently while connected to Wi-Fi. Let me know how you get on.
@91antoniolopez: Can you also try heading to Settings > Connections > Wi-Fi > 3 dot > Advanced > Switch To Mobile Data > Off > Wi-Fi Power Saving Mode > Off. If the connection continues to drop, try connecting to another Wi-Fi network, a friend or family members, to see if the issue persists, as this will help to determine if the problem lies with the phone or your current router.