I'm wondering how realistic the classic depiction of a western gunfight is and how often did stuff like that actually occur?
This older answer of mine should be of interest for you.
In addition to u/Gregory_K_Zhukov’s prior answer, I would offer two additional thoughts:
1.) Remember the “old west” or “Wild West” is largely a romanticized word better interchanged with “frontier,” which changed and existed at different times in different places. Several of members here expounded on the definition of the “West” here.
2.) Some of the more ambush-shoot-them-up type violence along what could be considered the frontier or west, at least specific to Texas, occurred as parts of long-standing feuds, which became sorts of regional wars, either raged by small factions or members of various families.
Two examples of this are the Stafford Townsend Feud in Southeast Texas and the Lee-Peacock Feud in north eastern Texas. The Stafford-Townsend Feud had some very dramatic gunfights reminiscent of the popular culture depiction of old-west shootouts. Although it is perhaps not the most accurate accounting of all the particulars of the feud and what caused it, “No Hope for a heaven, No Fear of Hell,” by Dr. Jim Kearney, Bill Stein, et al, has the most vivid collection of stories on the shootouts. One or two may be found in Stein’s “The Ungilded Lilly,” which is online via Nesbitt Memorial Library in Columbus, Texas.
The Lee-Peacock Feud was larger-scale violence, less of which figures into the popular culture romanticized old west, but it is there.
There were dozens of large and small feuds in Texas that do include specific incidents that would fit some classic depictions of western gunfights, ambushes, etc., including the Earley-Hasley Feud, and especially the Sutton-Taylor Feud.
Interestingly, the type of more romanticized shootout did occur on occasion in Texas through the 1930s and into 1950s, when two guys pulled out pistols and shot each other up in a cafe in Mineola, Texas, an incident played very dramatically by the media as an old-west style gunfight.
During the 1930s, the violence of this type was seen in oil boom towns in East and West Texas, such as Borger, complete with characters such as “Two Fun Dick” Herwif.
Sources:
C. L. Sonnichsen, “Feuds,” Handbook of Texas
C. L. Sonnichsen, “Sutton Taylor Feud,” Handbook of Texas
“Two Mineolians die in Pistol Duel Sunday,” The Wood County Record, February 27, 1951, p. 1.
Kearney, James, et al., “No Hope for Heaven, No Fear of Hell. 2016, University of Texas Press.
H. Allen Anderson, “Borger, Texas.” Handbook of Texas.