Do you know the reason it got rejected? What's the rejection code?
To file a prior-year tax return for 2023, 2022, or 2021, you will need to purchase and download that year's software since TurboTax Online and the mobile app are only available for the current tax year. See the link below to purchase and download the 2023 software.
To E-file your tax return, you will need EITHER last year's self-created 5-digit PIN, or last year's AGI (adjusted gross income). Your 5-digit PIN isn't saved anywhere; in this case you can use you AGI instead.
Your 2023 AGI is located within your prior-year tax documents Form 1040, Line 11.
There are a few reasons why your AGI, even if it is correct, it might not work, such as if your 2023 return was processed after April 15th, 2024, or not processed at all. In this case, you can try putting "0" for the AGI. See the link below for more details and scenarios. If after trying with "0" it keeps getting rejected, you will have to paper-file your return.