The two are OP because of Dynamax, which is very controversial and may be banned relatively soon, so possibly the answer is wait a bit.
But there are a few ways to deal with them. They're extremely limited and require not amazing Pokémon to do it at times, but not impossible.
First of all, Haze Pokémon, specifically Toxapex, deals with the two well. Baneful Bunker and Haze allows Toxapex to stall out and remove boosts from the two, whilst resisting at least one of each of their STABs.
Corsola-Galaria can burn and strength sap both to cripple them. Ferrothorn can twave and best Gyarados but not Hawlucha. Runeigrius can burn and beat Hawlucha with Shadow Claw, immunity to max knuckle and his huge defence, but loses to Gyarados.
Offensively, it's very difficult, and comes down to being super aggressive with fast electric types and scarf Pokémon to prevent either Hawlucha or Gyarados from snow balling. Scarf Dracozolt, Galvantular, GDarm, Dragapult etc. Be super aggressive and avoid any play that lets either get on the field for free.