Get your taxes done using TurboTax

When I quit my last job in early 2022, my employer made me repay the sign-on bonus they paid me in 2021. I told my employer to make a pre-tax deduction from my remaining pay in the amount of the sign-on bonus. I suggest you ask your employer if you can do the same, unless you have already quit or there is not enough time before you quit for you to pay back your bonus with pre-tax dollars.
 
Here is how it worked for me. My signing bonus was $5k, paid to me in 2021. At my request, my employer deducted $5k pre-tax from my salary in 2022 to pay back the sign-on bonus. In effect, my gross pay was increased by $5k in 2021 and decreased by $5k in 2022, so there is no change in the total amount I was paid during my employment, and no need to do anything fancy when I file my 2021 and 2022 taxes - I just put in the amounts from the W2 forms my former employer gave me for 2021 and 2022. A possible downside if you follow this approach would be if your bonus bumps you into a higher tax bracket in 2022 than you are in in 2023. 
 
Another approach is that you could write your employer a check for the net sign-on bonus amount you received after taxes, and your employer would back out the amount of the taxes from your remaining paychecks, but the first approach is probably easier for your employer. 

I didn't figure this out on my own; I read this thread, specifically the post by user @Opus 17 on page 5 with a timestamp of ‎June 24, 2020 10:17 PM.