How to prevent paying tax penalty next year

I ended up having to pay a tax penalty this year because I underpaid my taxes. Is there a way to try to calculate whether or not I'll need to pay a penalty next year, and if so, can I pay taxes now (in 2022) to avoid a penalty?

I have never made estimated tax payments. Is it possible to increase withholding of our December 2022 paycheck to pay more taxes if we need to?

How can I calculate whether or not we are underpaying?