Hello there. Do the brake lights work when the hazards aren't turned on? If so, then your problem is most likely going to be in the multifunction flasher module. I'm including instructions on how to replace the flasher in the images.
If you use your hazards often or do a fair amount of towing trailers, then I suggest the one in the link below. I run my hazards about 5 his a day and haven't needed a new flasher in 3 years because if how this thing is made. Before that I was replacing them at least yearly.
Hope this helps. Let us know how it goes.
Images (Click to enlarge)
Saturday, April 24th, 2021 AT 1:10 PM