I'm sorry to hear about your girl. Gastric torsion is when the stomach twists and both ends close off- leading to buildup of gas, gastrointestinal stasis, and cutting off of the blood supply to the GI tract. Bloat is a build up of gas in the stomach that can sometimes turn into a gastric torsion. Food bloat is caused by sudden overeating (dog gets into trash, bag of food) and sometimes needs surgical intervention as well.
Deep chested dogs are more likely to have this problem and usually when they are older. One way to prevent it is to have a gastropexy done at an early age. This can be expensive though- though doing it at the time of spay in a female can save money. They tack the stomach wall to the lining of the abdomen (near the ribs) and this will prevent torsion in the future unless the site breaks down. They can still bloat, but torsion is much more dangerous and threatens their lives much faster. Feeding meals elevated and slowing down dogs that bold food can help- also preventing them from gulping tons of water after exercise (a lot like you would prevent colic in a horse.)
Once they bloat, usually gastric lavage under anesthesia is necessary. If they have a torsion as well, abdominal surgery in necessary. They can decompensate very quickly and if the intestines don't "pink up" quickly after relieving the torsion, often time euthanasia on the table is the best option.
Older dogs that flail a lot getting up (on hard slick surfaces) can sometimes cause a torsion struggling to get up.
There's a brief window when surgery is an option but if you aren't home when it happens or near an vet that can do surgery right away, there isn't much to do. I'm sorry for the sudden loss of your girl and I hope this info helps. It catches most owners by surprise.