Sold personal vehicle used for doordash

I purchased my vehicle in 2019.  In 2023 I started doing doordash part time using my vehicle.  Near the end of 2024 I got rear ended and the vehicle was written off.  When it asks me in turbotax if I stopped using the vehicle for 2024, I checked that box.  Then I had to go through all sorts of things about depreciation etc.  Because I ended up getting more from the insurance than what the technical depreciation value of the vehicle is, it is reported as a gain and dropped my refund significantly.  Am I doing this correct?  I have since purchased another vehicle which I will again be using for doordash part time.