How would I be able to check if it’s the master cylinder
Do both front lock up? Or one? If both you could assume (yet possibly wrong if both callipers are seizing) that it’s the ABS or Master.
Step one. Start at the easiest thing at the furtherest point and work back from there, as with any problem.
Get the wheel/s off and inspect the two front or two back wheels. Would be good to inspect all four. Get the pads out, make sure the pistons are not binding. Give it all a clean and reinstall. Pump the brakes and see if it feels different.
All good? Move to the next thing. Get an inspection mirror, get in and check over the back of the master cylinder under the booster. Look right down at the firewall base for signs of brake fluid leaking. Not essentially going to rule out a faulty master cylinder (if it’s binding a bit or a seal is a bit average inside) but it’s an obvious thing you can look for. Unfortunately a leak can also be hidden behind the insulation that sits behind the booster.
For testing the ABS, you will need specialised equipment to operate it. A bi-directional scan tool.
For replacing the Master cylinder, you could do that, bench bleed it first and install, but the ABS will also need bleeding (AFAIK) and that will require a Bi-directional high end scan tool.
You won’t be able to cherry pick the cause and avoid doing work to find the fault. You could get lucky of course but getting lucky can also be expensive.
If you are semi-competent at servicing your own car, the brakes callipers are more than doable at home with basic skills.
Inspect the ABS sensors on each wheel as well.