After you file

You could file 2022 now, get the refund then you will have the money to send a payment with the 2021 amended return.  But be aware, if you have the money now to pay the 2021 balance due then file the amended return and pay it NOW since the longer you take to file and pay the amended return the more it will cost you in penalties and interest.