Thanks for playing!
Yeah there's some trial and error in learning how to deal with the enemies, especially the bosses. All the enemies (except the flowers) do show it when they're about to attack beforehand, for example, the first boss always changes the position of its feet before dashing, so those just have to be learnt. The bosses can indeed be played in whichever order but beating them gets you some upgrades.