How many series should I use in my battery pack

So, as with most thing’s, I tend to think bigger, or more is better. With regards to battery packs, I thought the best had to be 12s, since it’s the highest we can go. I’ve come to realize that isn’t the case, and sometimes it’s better to use lower series with certain motors, or type of battery, etc…

Could someone please share with me how we know what the best series number is for a given motor…?