Wyze doorbell installed, another existing doorbell stopped working

My house has 2 existing working doorbells. one at the front door which is about to be replaced by a Wyze Doorbell, and one at the door for the enclosed front porch. I will call the first one the front doorbell, and the latter one as porch doorbell for simplicity.

Top left picture: the old chime box before any work has been done.
Bottom left picture: I took a guess and bypassed the wire on 2.

Right picture: The mess I found after I unscrewed the old front doorbell. There are 6 wires instead of 2, and they are in 3 pairs, RW(red-white), GB(green-black), YB(yellow-black), YB isn’t connected to anything, so I just ignored them, RW and GB are what’s connected to the old doorbell.

Upon close inspection, the green and red wires are actually from the porch doorbell. You can see the white wire housing both wires coming down to meet the doorbell in the picture. This means my 2 doorbells are connected together, but there are 3 wires inside the chime box. After looking around, I found 2 dead doorbells in the house, one in the garage leading to the front porch, and one inside the basement washroom. I ignored these doorbells and moved on.

I installed the RW and GB wires onto the Wyze Doorbell just like my old doorbell. My earlier guess about bypassing the wire on 2 should be correct since the new doorbell is working now, but the old doorbell for the front porch doesn’t work anymore. I can’t move the Wyze doorbell to the other doorbell since there is absolutely no room there. What should I do?

PS: After some tinkering around, I found out that if I revert what I did to the chime box, both doorbells work, except when the porch doorbell is clicked, the Wyze doorbell will restart. So this is hardly a solution. Any other ideas?