Can I pay the balance I owe to the IRS for 2021 before I file my 2021 1040 return

I made a payment using IRS Direct Pay but selected the box "balance due" rather than "extension"