Biking elevation not correct

About a month ago I rode a rail trail in CT and MA for about 28 miles out and back. The trail has a gently up and down slop and my Garmin Instinct recorded 341 ft of elevation. At the time my Instinct was connected to a Pixel 7 phone. This week I rode the same trail and distance, using a new Pixel 9 cell phone. Elevation was recorded at 3,000 ft., which is obviously incorrect. Wondering if others have seen the same issue, and is it because the Instinct and Pixel 9 have a connectivity issue.

Thanks

Walt