Doorbell Wiring Issue

I’m 99% done with the install, but I’m stalled out on this complicated doorbell setup. Whoever wired this house… we are not friends.

The wire with the wyze fuse attached to it was connected to “front”. The pictured config is obviously wrong, but I can’t figure out why. Any help would be greatly appreciated.

I’m assuming the 2 terminals in the pic below are the output of the transformer. You need to remove the other wiring from the terminal you have the fuse on, then figure out which red wire is going to the doorbell. Essentially you’re making a direct connection between the transformer & the doorbell, without any other wires attached. So, the on the 2 transformer terminals, one should have the white wire from the doorbell, and the other terminal will have the red.