Car makes a humming noise that gets louder at certain speeds

Yeah, along with @CapriRacer, if the noise is there and then it disappears when you hit the brake, it likely is indeed the brakes.
There’s a tab on the pads that rides on top of the rotor to make screechy sound when they have worn down. Brakes are not under warranty and 40K is about right.
Usually front brakes go first because that’s where most the weight is but a friend of mine has that same car and I understand that Hondas of that vintage have a propensity of the rear brakes going first because they are undersized. See where the noise is coming from. It travels.
If you’re halfway handy and mechanically inclined, you could pop a wheel off and look where the pad is. You’ll notice a piece of spring steel that is now touching the rotor.
If you’re daring enough or have done it before, you could replace those brake pads yourself pretty easily, if that’s what’s going on.

If the noise doesn’t go away when you tap the brakes, @barkydog advice is the one to consider.
Bearings should be under warranty so that shouldn’t cost you anything.

Regardless, get it looked at soon.