After you file

You have to go back to the very beginning of the unreported transactions.  Each year's form 8606 follows from the previous year.  Specifically, line 2 (basis in traditional IRAs) should be read as starting basis, and line 14 is your new total basis at the end of the year, so line 14 from 2020 is used as line 2 from 2021, and so on.

 

If you always completed the backdoor Roth IRA correctly in the same year as the contribution, and never had any traditional IRA funds to start, then line 2 and 14 will always be zero.  But you already said that sometimes you didn't do that.  So best to go back to the beginning.