We nearly lost our first dog this way.
Teach everyone to keep all food waste and plastic bags in an inaccessible location. Cut bottoms off all food bags. Beware of visitors who are unaware of this hazard and might, say, drop a chip bag into an open wastebasket. Just because it's on a countertop doesn't mean it's inaccessible: the cat can knock things down.
In the aftermath of an accident, I checked our house and found many hazard bags in the recycling and elsewhere, including a dog food bags I'd kept 'because it might be handy'.
Those spring-loaded swinging garbage doors were not too hard to install.
Babyproof your house -- anything that might hurt a child might hurt a pet. Beware choking hazards, too.