I think once everybody is immobile or dead, nezuko brings tanjiro back to life and does the dance of the fire god with muzan until sunrise just like his dad did every year. that was the whole reason they had that tradition. pretty clever too, muzan can't track him down cause it's just some guy dancing in the woods, not fighting demons. so the skill is kept alive until a point where the demon slayer corps is collectively strong enough to take on muzan. muzan might somehow learn to resist sunlight, but that's where the 13th form will somehow come into play. it's probably something you learn spontaneously in just the right context, not something you're taught.