OK, this is easy. In your third photo there is a connector with TWO wires to it from your fan, and it is plugged into a connector with FOUR wires (x2) coloured Red-Black-Black-Yellow that is in the middle of a heavier cable from the PSU. That cable continues on to other output connectors. Simply pull the FAN connector (2 wires) out of the heavier one in the cable middle. Then plug the similar connector from your new fan in there. You can only make it fit one way - the connector body has some bevelled corners to ensure this.
OOOPS!!
I just realized from your later photos that the new fan you got is NOT the same type. Your old one had only TWO wires coming from the fan chassis, whereas the new one has SIX wires ending in a non-standard connector. That's because it has lights in the frame, and is designed to plug into a Controller box made by UpHere. I think what you really need is this
https://www.amazon.com/uphere-Computer-Cooling-3-Pack-PF120BK3-3/dp/B07VTNX8S4/ref=sr_1_5?c=ts&dchild=1&keywords=Computer+Case+Fans&qid=1619278336&refinements=p_89:upHere&s=pc&sr=1-5&ts_id=11036291
On that page, click on the simple Black fan pack (no lights). That's a three-pack. Then click on their third photo from the bottom and note the connector system details. Each fan comes with two connectors on its wires, and you are to choose to use one of the other but never both. One option is the three-hole smaller standard fan connector that can go to a 3- or 4-pin mobo fan header. IF that header is configured in BIOS Setup to use the older Voltage Control Mode (aka DC Mode) it can control the speed of this fan - a feature your old one did not have. (IF you want to use that, post back here for details.) The other option is to use the 4-pin Molex connector and plug it in exactly as your old fan was - that's the "easy" straight replacement.
You do NOT need to get a fan from UpHere. You DO need a fan with a 4-pin Molex connector on its wires and no lights, and it should be the 120 mm size.
Before you mount to new fan in place, look around the outside of its plastic frame. Most fans have a couple of arrows moulded in. One shows the direction of rotation of the blades. The other shows the direction of air flow though the fan. Make sure to mount it so the air flow direction is the way you had before.