When doing connector stuff, you can almost always search for "connector name pinout". With trrs audio jacks it's somewhat weird at times, tho, as there's a standard and a mess Nokia did back in the day (ever wondered why their earphones sounded weird when connected to newer phonrs? That's 'cause they have swapped mic and ground "pins").
That said, you need the second one from here. If you have trouble with identifying which pin on the other side connected to where, you can always use a multimeter (but usually they are kinda mirrored, i.e. the tip would be the farthest one from the sleeve on both ends)
Hope it helps
Addition:
- The colors corresponding to stuff can be found out by disassembling one of the ear cups and checking which colors it uses. E.g. you unscrew the right cup and see that it has red and golden wires, than red goes to the 1st ring, golden goes to ground (a.k.a. the second ring), the another single-colored wire goes to the tip. The mic cable usually has both gnd and signal kinda braided together, you separate the golden one from the 2-colored one, the former goes to the 2nd ring, the latter goes to the sleeve.
- The wires are usually badly solderable be default as they are covered with smth and may be also have chord for elasticity. Can be fixed by either using hotter temps on your soldering iron (I briefly used about 400c for that) or burning their tips with a lighter. Also, you'll probably need some flux (which kinda goes without saying, but just in case; make sure not to use acid accidentally as it eats through stuff even after looking evaporated or being washed off)
Addit2: shoul've scrolled a bit more for better pics. This one should work better than me explaining stuff with words:
Addit3: vids are also available on yt. Search for "trrs replacement"