Retail product shortages occur in two distinct instances (a) when supply genuinely decreases, such as a bad peach crop or (b) when there is no supply decrease but panic buying occurs.
The most obvious examples of product shortages caused by supply decreases are seasonal produce such as peaches. Consumers expect that no peaches will be available when it is not peach season. Consumers generally understand differences in year-over-year availability based on the size of the peach crop. Generally expected seasons supply shortages do not cause panic buying.
Retail product shortages without a supply decrease are caused by rapid increases in consumer buying.
In some cases rapid increases of consumer buying occur for no discernible reason. The great toilet paper shortage of 1973  is a good example. There was no supply shortage. An unfounded rumor about a toilet paper shortage appeared. The false toilet paper shortage rumor spread by word of mouth. The rumor induced consumer panic binge buying and a resulting shortage. The illusion of a shortage was continuously reinforced when consumers frequently found shelves empty. After four months the public finally realized there was never an underlying toilet paper supply shortage and the panic buying stopped.
In some cases rapid increases of consumer buying occur via a disproportionately large overreaction to an unrelated event. A good example is the Honda Civic shortage which was indirectly related to the oil crisis of 1978-1979. Through the 1960s and early 1970s Americans were happy driving large heavy fuel inefficient vehicles. During the late 1960s and early 1970s American oil production decreased and OPEC was organized. In late 1978 oil exports from Iran and Iraq disappeared. The retail price of gasoline dramatically increased due to a genuine supply decrease. Long lines appeared at gas stations in 1978-1979, similar to the first gas price crisis of 1973. The higher price of gasoline increased the demand for smaller fuel efficient vehicles. Due to word-of-mouth communication, the Honda Civic achieved cult status by attracting a disproportionately large share of the new demand for smaller vehicles. There was a Honda Civic shortage which lasted for months. There was no supply reduction to Honda Civic stock. Eventually the recognition of competitors for the Honda Civic and an increase in Honda Civic production ended the shortage. In this case, the specific Honda Civic shortage among a field of competing vehicles was a disproportionate reaction to indirectly related events. The oil crisis directly caused gas lines but only indirected affected the Honda Civic crisis.
The bullwhip or Forrester effect refers to increasing swings in inventory in response to shifts in customer demand as one moves further up the supply chain. Many consumers hoard a product. The retailer experiences a larger demand than normal and increases the order level with the wholesaler. The wholesaler experiences larger demand than normal from many retailers and increases the order with the manufacturer. The manufacturer experiences larger demand than normal from many distributors and increases production. If the demand increase is artificial rather than organic, then all supply chain layers experience a product glut when demand returns to normal. The product glut is even larger if many consumers temporarily stop buying because they realize they overbought during panic mode.
The concept first appeared in Jay Forrester's Industrial Dynamics. Wikicommons graphic here.
The boomerang or whiplash effect is terminology used by this author to describe a single-product single-location shortage followed by a glut. A single consumer engages in more frequent consumption of a specific product. For a while normal retail restocking works. Eventually the retail stock drops to zero. A larger order is placed by the retailer with the wholesaler. Stocking level of the single product becomes larger. When the meal preferences of the consumer changes, a short term single-product glut occurs. The boomerang effect has been observed by the author on tootsie rolls and Beefaroni
The coronavirus pandemic event of early 2020 resulted in shelter-at-home guidelines, closing of group meetings, and closing of non-essential businesses. However, grocery stores did not close and there were no actual product shortages. However, panic buying of various products categories ensued, such as toilet paper, paper towels, fresh meat, canned goods, etc. Difficult to predict spot shortages of specific branded products also occurred. The following are day-by-day stock level observations.
Stater Brothers and Vons both: Fresh meat completely gone. Shelf stable MREs in boxes or cans completely gone. Frozen meat present at normal levels. Deli stocked at normal level. Paper products 30% of normal at Vons. Beefaroni gone.
Smart and Final: Occupancy limit of 75 being enforced. Twenty people lined up on front of store at six foot intervals.
Vons: Parking lot has half the cars normal for time of day. Articles begin appearing about toiler paper buyer's remorse.
Vons: Parking lot has half the cars normal for time of day. Occupancy limit of 100 being enforced, actual occupants never exceeded 80. Fresh meat at 60% of normal. Shelf stable MREs in boxes or cans at 60% of normal. Frozen meat present at normal levels. Deli stocked at normal level. Beefaroni overstock.
Smart and Final: Occupancy limit of 75 being enforced informally. Five people at a time gain entrance. Zero to three people waiting in front of store. Paper products gone. Fresh meat 50% of normal. Baked goods 50% of normal.
Vons: Occupancy limit of 100 not being enforced. Paper products stock 10% of normal. Kleenex gone. Fresh meat 60% of normal. Baked goods 60% of normal. Deli stock 80% of normal. Shelf stable MREs in boxes or cans 30% of normal. Beefaroni overstock.
Stater Brothers: Parking lot 40% of normal. Fresh meat 90% of normal. Frozen foods 60% of normal. Paper products gone. Cleaning product gone. Beefaroni gone.
Vons: Meat 70% of normal. MREs 50% of normal. Paper gone. Bread 50% of normal. Cleaning supplies 10% of normal. Beefaroni present. Stater Brothers: Meat 90% of normal. MREs 50% of normal. Paper 5% of normal. Bread 70% of normal. Cleaning supplies 40% of normal. Beefaroni gone.
Stater Brothers: Meat 80% of normal. MREs 30% of normal. Paper gone. Bread 60% of normal. Cleaning supplies 40% of normal. Beefaroni gone. Vons: Meat 50% of normal. MREs 50% of normal. Paper gone. Bread 50% of normal. Beefaroni overstock.
 Crockett, Zachary. "The Great Toilet Paper Scare of 1973." Priceonomics, July 19, 2014, priceonomics.com/the-great-toilet-paper-scare-of-1973/.
Oremus, Will. "What Everyone's Getting Wrong About the Toilet Paper Shortage." Medium, Marker, April 2, 2020, marker.medium.com/what-everyones-getting-wrong-about-the-toilet-paper-shortage-c812e1358fe0.
Jeffrey Sward, March 2020.