There are six endings in Hollow Knight, and different endings require different conditions. For example, ending one is Hollow Knight, and the condition is to kill all the Dreamkeepers, obtain the Heart of the Void, and defeat Hollow Knight. Ending two is the sealed compatriots, and the condition is Team up with Bumblebee to defeat the Hollow Knight.
Ending 1: Hollow Knight
Conditions: Kill all Dreamkeepers, obtain the Heart of the Void, and defeat the Hollow Knight.
Ending 2: Sealed Compatriots
Conditions: Kill all the Dreamkeepers, obtain the Void Heart, and work with Bumblebee to defeat the Hollow Knight.
Ending 3: No more dreams
Conditions: Kill all Dreamkeepers, obtain the Heart of the Void, and defeat Radiant.
Ending 4: Embracing the Void
Conditions: Obtain the Heart of the Void, pass all pantheons, and defeat the Supreme Radiant.
Ending 5: Delicate flowers
Conditions: Obtain the Heart of the Void, give delicate flowers to Godseekers, pass all pantheons, and defeat the Supreme Radiance.
Ending 6: The end of an era
Conditions: After reaching any other ending, listen to Mr. Mushroom's dialogue in all areas in a special order.