I'd just get an extension cable & get to soldering. Alternatively, install a converter so you can attach a USB cable.
retrocomputing
Discussions on vintage and retrocomputing
If you actually just need a replacement PS/2 cable, it looks like eBay has them for sale.
Monoprice sells PS/2 to USB dongles.
Buy any recent(ish) keyboard with a PS/2 connector, remove it, and soldier it onto the Model M.
You could always go anachronistic and make it Bluetooth.
So unlike apparently everyone else on these threads, I actually have a Model M. Okay, technically I have three Model Ms, but still...
What kind of PS/2 cable is it? permanent or modular?
Is it still working, even if it looks rough?
Are you comfortable soldering?
If not, are you at least comfortable following a simple wiring diagram?
You’re looking for what’s called a “pigtail”. Ps/2 seems to be another name for 6-pin “mini-din”, which is a standardized connector format.
Here’s an example.
https://www.amazon.com/AIMLYF-CONNECTOR-PROGRAMMING-BREAKOUT-CABLE/dp/B0D9BD64QR/
You can try searching anywhere that would carry that kind of equipment like mouser.com or digikey.com.