The displayed TTL is a value from the ping reply packet. The host sending that reply decides the initial TTL for that packet, and it's decremented once per hop en-route to you.
Allow me to show an example from the perspective of my home:
jsw@athena:~$ traceroute -q1 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets
1 172.19.87.1 1.351 ms
2 142.254.146.57 8.264 ms
3 74.128.7.229 760.606 ms
Pinging my default gateway results in replies with TTL=64 because that's the initial TTL value used by my home router.
jsw@athena:~$ ping 172.19.87.1
PING 172.19.87.1 (172.19.87.1): 56 data bytes
64 bytes from 172.19.87.1: icmp_seq=0 ttl=64 time=1.232 ms
Pinging the second hop in my outbound traceroute gets me replies with TTL=254. I can assume they were initially sent with TTL=255 by the ISP router and decremented once as they passed through my home router. Note the ISP router uses a different initial TTL value than my home router; each host can choose its own initial value.
jsw@athena:~$ ping 142.254.146.57
PING 142.254.146.57 (142.254.146.57): 56 data bytes
64 bytes from 142.254.146.57: icmp_seq=0 ttl=254 time=9.707 ms
Pinging the third hop results in replies that have TTL=62 when they arrive at my home PC.
jsw@athena:~$ ping 74.128.7.229
PING 74.128.7.229 (74.128.7.229): 56 data bytes
64 bytes from 74.128.7.229: icmp_seq=0 ttl=62 time=18.884 ms
{}
).