Being in an automobile accident is always stressful even when there are no obvious medical injuries to anything (i.e. the best case of a bad situation). The most important thing right away is safety. Being sure the people and vehicles are not in a position to be struck by other traffic, contacting law enforcement, etc.
But what about information that might be needed later for insurance of legal purposes? What, of the barrage of details you'll receive, needs to be tracked or obtained? Everything. However, there are some important documents and pieces of information that can be especially helpful for future legal considerations.
Your memory of what happens is important. Human memory isn't like a video recording that is accurate and permanent. To help keep important details known it can be a good idea to write down information when it is fresh in your mind.
Some specific types of information that are important include things like who the other driver was (i.e. exchanging information). What did the other driver say, if anything (write it down later). Whether the other driver was working for someone else at the time of the accident can also be important to know.
Are there other witnesses around at the time of the accident? Finding their contact information can be important and especially important if they are not connected to the accident.
Look around. What's the weather like? Commonly accident victims will take pictures of their vehicle with extra detail. Those are important, of course, but taking a short 2 minute video panning around what the area looks like at the time of the accident may be more important. Don't forget to take pictures of of the other party's vehicle including any damage or obvious defects (e.g. a missing mirror) and the roadway itself. Close up pictures of any defect in the roadway (e.g. a large pothole that someone may be swerving to avoid).