One day i was gonna look at my phone to go on youtube but then it says its connected but it keeps saying there is no internet connection and i have good internet
Welcome to Android Central!
Try to test your internet speed. If it's very low then any app can't connect to it's servers and it will say that you don't have an internet connection.
Best regards,Mikey. I hope you found what you were looking for.
Sent from my Samsung Galaxy S7 Edge SM-G935F.