Good ending requires "collecting" all Princess wasps before entering the Point of no return in Barnabys Lab.
With each ability unlocked you unlock 3-5 challenges tied to it. Make sure to clear them as they pop up as you won't have time to backtrack through the maps at the end.