If one of your guinea pigs sadly dies, leaving a single guinea pig left alone then yes, your remaining guinea pig will be very lonely and needs a companion. If you have more than two guinea pigs and one dies, then it's not absolutely necessary to get another, but if you want to buy or adopt more then go right ahead.