Spoilers ahead for Meta Knightmare Ultra in Kirby: Super Star Ultra.
Galacta Knight is the final boss of that mode, and Nintendo has deliberately never explained where he came from or what is under the mask. That silence has generated more speculation than almost anything else in the series.
He is a warrior sealed away long ago, immensely powerful, and released to fight Kirby. Everything else, his origin, his allegiance, his face, is left blank. That is the entire canon.
One elaborate theory, widely circulated in story form, places him in a distant future after an apocalyptic "New Beginning". In that version a replacement Pop Star is built, a pink knight in white armour is created as its guardian, and he travels back in time by leaving a decoy behind while his real self stays in the future. Whether he is hero or villain is left unresolved even within the theory.
Kirby games rarely over-explain, and the refusal to fill in Galacta Knight's history is what makes him memorable. Treat any detailed biography you read as fan fiction, however confidently it is written.