You can deduct business mileage by using the Standard Rate method or the Actual Expenses method.
Standard Rate: Multiply your total business mileage by the standard mileage rate (56 cents/mile for 2021, 58.5 cents/mile for 2022) to determine your deductible auto expense.
Actual Expenses: Record all of your car-related expenses from the previous year (e.g. gas, repairs, parking fees, tolls, etc.), and deduct a portion of it that can be attributed to business travel.
Note that once you elect to use the Actual Expenses method, you cannot change to using the Standard Rate method in subsequent years.