Either under the “present sense impression“ or “outcry“ exception to the hearsay rule.
If the shooter yelled “Allah Ackbar” it would not be heresay to testify to that. It’s only heresay if you are introducing it to prove the truth of the matter asserted. That would not be the case here.