If one brake locks, it could be due to caliper piston which is causing the drag and eventually the wheels locks up.
If all the wheels lock up at the same time, it could be due to master brake cylinder. Just drive the car for few kms, check which side of the wheel is more hotter compared to others. If you can find it, you can drive further and check whether that particular wheel gets locked. If it's the case, then the caliper piston of the wheel needs to be changed.
If there is not hotness and all wheels gets locked, it's a master brake cylinder. But when a brake cylinder gets hot, fluid will be flushed out through the brake oil cap in the engine bay.
brake booster can't be the cause but cannot be ruled out. start the car, press the pedal normally and then release. if the pedal comes up and requires less pressure the second time, brake booster is working.
If the car has ABS
,malfunction of ABS
sensor also cannot be ruled out.
As a intial step, check the brake pads. Do a brake bleed, change the brake fluid and check how it's running. As you have mentioned the vechicle has been parked for some time, do the intial check up.