W-4

I would like to understand what I should do not to owe money to the IRS. According to the IRS calculator enought money is withheld from our paychecks, but we had to pay a large amount of money when we did our 2022 taxes.