The APN tells the phone how to connect to your network's internet. A wrong APN means calls work but data doesn't.
1. Check the basics first: mobile data is on, you have a bundle, and Airplane mode is off.
2. Samsung: Settings, Connections, Mobile networks, Access Point Names.
Others: Settings, Network and internet (or SIM cards), your SIM, Access Point Names.
3. Tap the three dots, then Reset to default. Most phones then load the right settings for the SIM.
4. Still nothing? Ask your network for the correct APN details (or request settings by SMS) and add a new APN with them.
5. Restart the phone.
Phones bought abroad sometimes lack local settings, so the manual APN is needed.