After you file

ALL of the 2021 refund (even the stimulus credit portion on line 30 of the form 1040) can and WILL be used to pay down any prior year taxes.  Only the advance stimulus payment was immune from old unpaid taxes.