How can gods from all mythology exist at the same time?

I’ve been thinking about this question a lot lately and was curious how that would be possible? Rick Riordan has multiple series in the same universe but with different myths and I was wondering how that would work.