Guinea pigs are herd animals, so you always need at least two - and with no upward limit apart from what practicalities of space, time, and finances allow!
It may take time for guinea pigs to get used to each other if they are not from the same litter, but they'll get there in the end.

Guinea pigs need the company of other guinea pigs
For more tips and advice on introducing guinea pigs to one another, have a look at the Making Introductions section of this guide.
Marcia, 18 April 2022
I sadly lost my oldest guinea pig and i let my yonger guinea pig say his goodbyes and give him a hug so he knows the other one wont be around and he seems to be eating and running around and he seems fine but i want to know how long i should wait until i get him a new companion because I already find it weird not having the two of them and i dont know weather he thinks that to and he wants a new friend or not can someone please let me know what i should do and weather i should get him a new friend