The IP PIN provided by the IRS is only for the current tax year. Prior year tax returns can only be printed and mailed, they cannot be e-filed using TurboTax.
There is a section in the signature area on the Form 1040 to write in an IP PIN but if you do not know the PIN for the tax year being filed, it will take the IRS a bit longer to process the mailed return.
To complete and file a prior year (2021 thru 2023) tax return using TurboTax you would need to purchase, download and install on a personal computer one of the desktop editions for each tax year required from this website - https://turbotax.intuit.com/personal-taxes/past-years-products/
TurboTax does not support tax years prior to 2021. You would need to seek out a local tax professional for those tax years.
When mailing multiple tax years you a separate envelope for each tax year.