Can I file an extension and pay what I owe if I haven't done 2022 taxes yet?

Will I be able to print my return when I pay what I owe on my 2023 extension?