Electric space heaters use 1500 watts of electricity per hour and can max out the circuit alone especially if your electrical circuit is only 15 amps.
Make sure nothing else is on that same circuit that is drawing electricity and then try the space heater again.
If it doesn't trip the breaker then it means that the circuit was just overloaded and the breaker did it's job correctly saving you from overheating your electrical wiring.
When a lot of devices are connected to the same electrical circuit and are all running simultaneously, it can exceed the capacity of the electrical wiring causing the electrical circuit to trip.
If it's still tripping the circuit breaker then the electric space heater could have a short in it and should not be used.
Electric space heaters should really be on their own dedicated electrical circuit due to the high amperage draw and for safety as well.
Another thing is make sure the plug is fitting tight into the electrical socket because a loose plug can cause an overload as well causing the breaker to trip when the space heater is on.