The tracking information is kept in the USPS system for around 90 days but the USPS doesn't keep a record of those tracking numbers.
If you lost a tracking number then you won't be able to track the USPS package without it unless you contact the person or company who sent the package and request a tracking number from them.
The company or person who sent the package should have a record of the tracking number in their system or written down somewhere.
There is another option though to track packages and see what mail is gonna be delivered to your address through USPS informed delivery that you can signup for.
Then you can be alerted when packages are to arrive or when even letters are to arrive and see a photo of it on your phone or computer.