Like many things in accounting there are several ways to track things like this, and you will get various responses, I prefer
Assuming you have a subscription to QBO+, I set up a class per truck and then tag those transaction with the truck class. That allows me to report on the class to see all transactions for that class. If you set up a parent class, trucks, then sub classes for each truck, you can report on the parent class (never post to a parent class or account) you will get a report on all sub classes (all trucks)
In QBO there is a choice to use class or location, I use a class because each line item on a purchse or sale can be tagged with a different class, location can only tag the whole transaction.
gear>settings>company settings
company>categories and turn on classes/locations
OR
Gear>accounts & Settings
Advanced>categories and turn on classes/locations
class allows you to tag each item line in a transaction
location allows you to tag the entire transaction
Then you can run P&L by class or by location, as well as a class report