How to make a ‘One Hit and Dead’ platformer feel fair

I am currently making a run ‘n gun platformer, in which the player dies instantly when they get hit. I’m curious how to make this feel fair. I’m aware of putting checkpoints frequently enough, allowing the player to retry almost instantly, and merciful hitboxes. But I’m curious to know how I should go about level design?

You see, games like Hollow Knight let you learn how to avoid taking hits early in the game by giving easy challenges. If you get hit by something unexpected in Hollow Knight, you can always focus and gain some health, and it wouldn’t feel unfair. If that happened in my game, that would feel unfair.

Since I’m designing a Megaman-X like game with a boss at the end of each stage, how am I supposed to go about teaching the player how to dodge fast moving projectiles that you would only know how to dodge after seeing how they act?

And yes, there is going to be a first level before you can go play the other ones in whatever order you like.