Usually the condition of the road and the tread on your tires. ice, snow, even dirt and gravel can affect breaking.. Bald tires augment the situation.
When you slam the breaks, try holding on to the steering wheel.
Front end could be out of alignment, too. Or brake pads worn unequally.
Other people asked questions on various topics, and are still waiting for answer. Would be great if you can take a sec and answer them