Retirement tax questions

What do you mean, the company paid off the loan with 401(k) funds?

 

If you did not pay off the loan when you left the company then the loan becomes a distribution to you and you will receive a Form 1099-R for the amount of the unpaid loan.

You report the Form 1099-R on your 2023 federal tax return as ordinary income.