Guinea pigs should never be left without a companion. If you have more than two already, if one dies it’s not essential to replace it. But you can if you want - the more the merrier, as far as the GP community is concerned!
If one of your two guinea pigs dies and for whatever reason you don’t want to get another, it's best to give your single guinea pig to a friend who already keeps guinea pigs, or, failing that, to a local pet sanctuary.
Check out the Introducing Guinea Pigs section of this guide for handy tips on getting GPs together.
Guinea pigs get very lonely, so always provide them with companions
Anyone who claims that their guinea pig doesn't enjoy the company of other guinea pigs is simply mistaken. All guinea pigs are herd animals, without exception.
When introducing new guinea pigs, it should be on a neutral territory. This means an area in which neither animal has spent a lot of time, and therefore doesn't feel territorial about. This could be a large cardboard, or an area of your house that's safe for the guinea pigs to nose around. This area should be big enough for the guinea pigs to meet without being forced too close together, as this could make them feel threatened and therefore less likely to bond.