Both figures are estimates based on whatever data is available to your Garmin or Strava, I know Strava tweeks your energy figures based on what you tell it, HRM (if you have it), Does strava use cadence if it is available?, it applies a factor for rolling resistance differently for a Road bike Vs MTB and whatever you put in for your own weight (as well as that of the bike?), it knows from the GPS log if you were going up down or along the flat for any given section of the ride and it knows your speed of course but it doesn’t know if you were ridng with a 10kg monster pack or just minimum lycra and a 500ml bottle, it won’t know if your tyres were a bit flat or you had your seat too low, there’s loads of gaps it has to fill with assumptions…
Its probably not too bad maybe +/-15% max?
The estimates are only as good as the data, and I think all of the above is superseded if you have data from a power meter to input as that is a direct measure of your effort…