If you don't want the rocket to crash after every launch, you have to add a recovery mechanism.
All recovery systems work according the same basic principle: change the CP / CG dramaticly, this to increase drag and lower the speed your rocket is coming down with.
Most off the recovery systems work with a parachute.
On this page you find a mechanism that triggers the release of the parachute by detecting the forward speed (= speed in the direction off the longest axis) off the rocket.
Close to apogee, this forward speed decreases and becomes almost zero if the flight path is vertical.
The detection mechanism is an airflap, a mechanism that is commonly used.
If the speed is high the rapid moving air forces the airflap in its locked position.
But when the air-speed decreases below a threshold the mechanism triggers and releases the parachute.
There are many variations that can be found on the net but the construction i describe here has some distinct advantages.
It is very light, simple to construct, robust and adds lesser drag compared to most other air-flap trigger mechanisms.
Also it can easily be modified to other airspeed trigger levels to accommodate the design of your rocket.