Hi accounts-nationa, thanks for joining the Community
Classes in QuickBooks Online can only be assigned to a transaction (either to the whole transaction or to an individual transaction line) and not budgets.
We appreciate it would be handy to have this option, and recommend leaving feedback with our product developers via the Settings wheel > Feedback.