I cannot name the very first, but shooting games were already around in the early 1980s.
That era gave us light-gun titles in arcades and early blaster games on home systems, so firearms were part of the medium's vocabulary from close to the beginning rather than arriving later.