Self-Employed Mileage/Gas Deduction

Hello! So for the year of 2023 I have done Instacart shopping and DoorDash dashing as a self-employed contractor. I have been using my dad's vehicle that I am listed as a driver on to do my work. Being that he is currently the owner of the vehicle, as I understand it, I cannot deduct mileage or gas expenses, however, if I buy the vehicle from him or he gives me the car can I then deduct the mileage expenses given that I used the vehicle for my business?

 

I would really appreciate any help! Thank you!