I’m sorry for your loss.
I'm afraid we cannot say why your piggy passed away. As a prey species, they hide their illness so often by the time you see symptoms it can already be too late. Sometimes, things happen suddenly and there is nothing anyone can do.
Ensure you weigh your guinea pigs weekly (its part of routine lifelong care) as it is the only way to know they are eating enough hay (you cannot judge hay intake by eye). Often weight loss can be the first sign of a problem before other symptoms become evident. Weighing them weekly can alert you to a problem and allow you to step in with syringe feeding while waiting to get to the vet.
If your remaining piggy isnt eating properly, then you must step in and syringe feed her. They must have fibre rich food going through the system all the time to prevent it from shutting down. You will need to switch from weekly weighing and instead weigh her daily so you can be sure in real time that she is getting enough hay and syringe feed.
I will add in guides below which will help you with more information than I can type here. It explains how to syringe feed, as well as information on dealing with gas and bloating issues.
A piggy who is grieving but otherwise ok in themselves and eating can wait a couple of weeks before finding a new cage mate. If she is acutely grieving then you will need to get her a friend ASAP.
The best way to find a new friend is via dating at a rescue centre. That way your piggy can choose her own new friend and you cam be assured that they like each other and have character compatibility.
If rescue dating is not an option and you have to get a new piggy from a pet shop, then you will need to check the sex of the new piggy yourself and carry out the bonding procedure yourself at home correctly (guide on how to do it below). Always having a plan b in mind in case they don’t bond (needing to live side by side in separate cages).
Regarding quarantine, if the new piggy you get is under four months old then you cannot quarantine. You must carry out the bonding procedure as soon as you bring the new piggy home. Piggies under four months old are too young to ever be alone. You have to take the chance and if the new piggy does bring an illness in, then you will need to treat them both.
The guides below will help further
Not Eating, Weight Loss And The Importance Of Syringe Feeding Fibre
Complete Syringe Feeding Guide
Digestive Disorders: Diarrhea - Bloat - GI Stasis (No Gut Movement) And Not Eating
Weight - Monitoring and Management
Looking After a Bereaved Guinea Pig
Bonding and Interaction: Illustrated social behaviours and bonding dynamics
Sows: Behaviour and female health problems (including ovarian cysts)