Generally, yes, you must be injured in an accident to seek compensation.
Many times injuries don’t manifest for a few days, or even a week. I have seen several days pass before somebody realizes that they’re a little more shaken up than they had originally assessed. They then can seek medical treatment.
Generally, if you don’t have any injury and you haven’t had any medical treatment, then no, you can’t get compensation. You may, however, still be able to get compensation for property damage, such as vehicle damage (if your car, truck, or SUV was damaged).
Even though you weren’t hurt, depending on the circumstances of the accident, you could certainly have a claim against an at‑fault party, insurance carrier, or your own uninsured or under‑insured motorist carrier, for property damage.