Why do I need to worry about depreciation if I gave away a car for $0?

I bought a new car in 2012, began using it partially for business in 2017, and gave it away for $0 in 2020. During the tax years when I used it for business, I deducted the standard mileage rate on Schedule C.

 

In my 2020 form, I checked the box to indicate I stopped using the car -- and I am asked to complete a series of forms regarding the sales price, gain/loss, and depreciation costs.

 

There was no sales price. I gave it to the dealership, the dealership sold my mother a new car, and she gifted me a used car. Should I enter any of that in the 2020 forms? If so, where and how?

 

When I calculated the depreciation for four years of business miles, TT said I owed nearly $4,000 in taxes. That doesn't seem right. Is it right, or am I doing something I don't need to do?