Amended taxable income

I e-filed Fed and State taxes on 2/2/23 with form 1040-SR and received my Fed refund a week later via direct deposit. I subsequently received an unexpected W-2 for less than $2K. When I completed an amended 1040-X it showed my taxable income increased by $3.5K rather than the <$2K on the W-2, and I now owe the Fed about 2/3 of my original refund, in spite of the fact appropriate taxes were withheld on the W-2. Any information, suggestions or an explanation of the discrepancy between the actual additional income earned and the taxable income shown on the amended 1040-X will be appreciated.