Credit/Deduction for Repayment over $3000 in the next tax year

Hello,
I've been trying to figure out how to include a repayment in my taxes and am still very confused so would really appreciate some help here.
In 2023, I started my first job and received a $10,000 relocation assistance that I need to pay back if I leave the company within 2 years. So last year, I filed my 2023 tax return, which included that $10,000. I left the company last year (2024) as well and was asked to pay back $9,235 (Social Security and Medicare taxes were refunded).
I read through the "repayment" section of
but am still confused about my options for either taking a credit or a deduction on my taxes.
If I want to claim the credit, do I need to amend my taxes for 2023 and mail IRS the 1040-X form, or do I just include that credit in my 2024 taxes? If I need to amend my taxes for 2023, do I need to get a corrected 2023 W-2 from my company showing that I paid back $9,235, which should reduce my income in boxes 1, 3, and 5 on W-2? Or do I subtract the amount myself when I fill out the tax amendment form for 2023?
I came across a couple of posts with similar questions on this forum and saw that you can claim the credit on the year you repaid, so I'm hoping the answer to my question above is that I can claim the credit on my 2024 tax return, and don't need to file an amendment for 2023 taxes. Please let me know if I understood incorrectly.
If I want to instead deduct the $9,235 from my 2024 taxes, which form and line would this amount go to for federal and state? Is my only option itemized deduction? Or can I still use standard deduction and subtract the amount from my income?
Thank you!