Lots of differences, much down to sampling rates, plus a phone GPS may be more tuned to nagivation than tracking. Where the devices are kept also makes a difference. Clear line of sight of the satellites is important as is a good lock on lots of them. Phones can do navigation with a limited lock and will snap to a road on a map so accuracy isn’t so important.
A Garmin can also use a wheel speed sensor which will track actual ground distance, though you need the sensor fitted to the wheel. They usually have a barometer which can be more accurate with altitude, though you really need to calibrate them. A phone via Strava will use mapping data to correct altitude, though it’s based on known altitude in a grid square.
The use of mobile masts is to mainly provide a fast lock. GPS lock requires downloading known satellite positions and other data. It’s slow from the satellites but quick via mobile data. Phones can do basic positioning from the masts also on the absence of a GPS lock but it’s not accurate.