Sadly, the game has no stated lore, so it's left to the player to think of their own story. The assumption that the game takes place during the scorpion war from the first game is unlikely, because there are no scorpions to be seen or even mentioned. A possible explanation could be that the bugs are having a civil war some time after the scorpion war, explaining why both sides mostly have the same weapons/gear, unit types, and even the same heroes some how, and because at the end of bug heroes quest it was stated that the scorpion resistance was destroyed when the ants joined forces against them. If the ants were reunited and the scorpions along with their armies are dead, it makes sense that there is a civil war, considering the fact that there are ants fighting on both sides of the war even after the scorpion war. Bug heroes 2 can't be a prequel to either of the other bug hero games, because the other games take place when Ant, Beetle, and Spider first joined forces For the first time. However, here they are fighting together with all of the other heroes and some new friends. This is just a theory that I think explains the untold story.