Most tracking numbers have more going on within them than you think. They usually end in a check digit, and some encode extra information within the number like destination zip code, shipment class, and the shipper's account number. Others just increment a number with a fixed prefix and no check digit (boooorrrrrring)
Here's an example breakdown of a USPS number https://trackingnumber.fyi/420112139261290983497923666238