Update:
When tested in circuit, the relay wouldn't switch every time. I ordered a new one and replaced it, along with the burned diode.
It didn't repair the device, it made it worse 💀😂
The old relay worked fine when I took it out.
Then I remembered that I've found a video saying it's a capacitor fault. I didn't test them because I don't have an ESR meter, just the capacitance mode on my multimeter. The capacitors were hard to get, hard to unsolder due to the bent legs so I gave up after testing the first one. I didn't want to damage the PCB by burning it or lifting traces.
After replacing the relay, I had nothing to lose.
My local electronics store didn't have the right capacitors. They gave me 60V instead of 25V. I know there's some leeway in voltage but I wasn't sure if that wasn't too much. I replaced almost all the capacitors since they were under $2 all together and now the device works!
It's funny that a 4.7 uf capacitor can mess up the whole device and make it buzz, although there's no visual signs that the component is bad.
Thanks everyone for helping!