After a crash a lot happens at once, and the camera is the least of it at first. Even so, the first few minutes decide whether the footage still exists later. A clear order of steps lets you handle both.
First things first
Make the scene safe: hazard lights, high-visibility vest, warning triangle. Help anyone injured and call the emergency services. Only once the scene is secure and nobody needs help is there time for anything else. No video justifies cutting that part short.
Warning
You must not leave the scene before the necessary details can be established. That applies regardless of what your camera recorded.
Securing the footage
Many cameras protect a file automatically as soon as the impact sensor triggers. Do not rely on it. If the camera keeps running, so does the recording loop, and on a small memory card the decisive file can be overwritten within an hour.
The simplest route is the safest: switch the camera off and take the memory card out. If you would rather not remove the card, mark the file using the camera protection function and then check that the mark was actually applied.
Copy the file unchanged to a computer at the next opportunity. After that, work only with copies. The original stays as it is, including its timestamp and metadata.
Documenting at the scene
The footage shows the sequence but not the state of things afterwards. Photograph the final position of the vehicles, the damage from several distances, the surroundings including signage, and the road surface. Note names, addresses, registration numbers and insurance details.
Record what time your camera shows and how far that differs from the actual time. That note settles follow-up questions later without anyone building a contradiction out of it.
Who gets to see the footage
You can tell the police at the scene that a recording exists. Whether and how it is handed over is usually settled afterwards; the article on presenting footage to the police covers that.
Your insurer receives the recording together with the claim. The same applies here: the original, not an edited version. The article on submitting footage to insurers describes what matters.
What you should not do is post the footage online from the scene. That creates facts you cannot take back and touches the rights of everyone else involved. The article on publishing footage works through that.
Afterwards
Once the matter is settled, delete the copies you no longer need. Footage secured for a reason also has an end point.
When nothing happened at first
Not every encounter ends in damage. Even so, securing a recording can make sense: after a near miss, after a vehicle has pressed you for a long stretch, or when you have the impression that someone acted deliberately.
Secure the file the same way and note the time and place. Whether you do anything with it can be decided later. What cannot be decided later is rescuing a file that has already been overwritten.
In such cases, consider as well whether the scene teaches other people something. That is exactly what channels covering road traffic are for, and the route to them is described in the article on your first upload.