Do my underpaid taxes from 2022 get credited towards my 2023 return if paid in 2023?
No.
The penalty for underpayment of estimated taxes is a penalty and you don't get a credit for it the following year.
Please read this IRS document for more information.