“Epi” means “by” or near”. “Pan” means “all”. So based on that understanding alone, it was mostly about how widespread something was.
I was right.
An epidemic is used to describe a sudden increase in the number of cases of a disease—more than what's typically expected for the population in that area.
An epidemic becomes a pandemic when that disease has spread over several countries or continents, affecting a large number of people.
I found a great example in my online searches:
HIV was and still is clearly a huge problem, but it's not necessarily an epidemic in the US right now. I read that there are about 50,000 new cases of HIV each year in the US, and this number has been pretty stable for decades. Because of this, there’s not really an HIV epidemic in the US — because they are getting the ‘expected’ number of cases. Should there be another sudden increase in the number of cases in the disease, this could change.