I cannot speak for every state ever, but I remember that roads in WA were mostly funded by gas/diesel taxes + vehicle registration fees.

Which is also why WA state has been charging an additional significant car registration fee on EVs (on top of the usual annual registration costs), since EVs don't contribute to this normally through gas/diesel taxes.