If you logon to your Uber or Lyft accounts, they keep a record of the number of miles driven. They also provide a breakdown of some of the expenses that you can deduct from your ride-sharing income. When you account for vehicle expenses during the self-employment interview, you can choose to deduct either "actual expenses" (gas, tolls, vehicle repairs, vehicle depreciation), OR expense a flat rate for each mile driven for ride-sharing. It is almost always better to take the flat rate, and since the ride-sharing services track your miles for you, more convenient.
You can't deduct any expenses that you can't prove. It's your responsibility to keep records, and if you are audited you are going to lose all of the deductions business expenses that you can't prove.
Normally, you can deduct the miles that you drive while carrying passengers and also the mileage that you drive if you drive from home to a particular place to start working, such as the airport. The Uber and Lyft apps may track your passenger mileage, you should check with their driver support team.
Ther are two methods for deducting your vehicle expenses, but both of them require accurate mileage logs. You can either deduct using the standard mileage rate or you can deduct actual expenses. The actual expense method requires that you keep all of your vehicle expense records for the year, including gas, repairs, maintenance, insurance, and depreciation. You then use your total mileage driven and your business mileage driven to figure out the percentage of business miles that you drove and then you can deduct the percentage of your total expenses. (A record of bank withdrawals is not going to be sufficient proof of your gas expenses, because there won't be any proof that you spent it on gas, unless you are talking about actual debit account charges at the gas station.)
For most people, the standard mileage method gives a better expense deduction not to mention being much easier and requiring less record keeping. However, you must have accurate mileage records.
If you can't get your mileage records from the apps, or your passenger history, then you either take no expense deduction, or guess at your expenses and hope you aren't audited. It's your risk.