Milage deductable

Hi I have 2 jobs one of them gave me W2 and the other one gave me 1099-NEC. Since I made more money on W2 can I deduct mileages from my W2? Or can I deduct from both job?