Wifi and data connectivity with new iphone
I recently just bought an iphone 15. It was working fine in the morning, it connected to wifi, and my cellular data was working. But at around noon it all stopped. It says that im connected to wifi but i get no internet. Apps display no internet connection. My data also stopped working, as it displays that it is being used but none is actually being used. I have tried connecting to my friends hotspot too. It connects, and displays on their phone that a user is connected, but i still dont get internet. What is the issue?
iPhone XR, iOS 18