Can I deduct tax paid to a second state?

Hello,  I had to pay taxes to a second state for a prior year in 2022. I had to pay because TT did not calculate my taxes properly, according to the State Tax people.  Can I deduct the amount I paid in 2024 on my current IRS tax form, and if so, where do I post it?  Thanks in advance for any information.