During and While are similar in meaning (function), but they are used different grammatically.
Difference Between During and While
How to Use “During”
During is a preposition which is used before an activity to indicate that a parallel action is happening at the same time as that activity.
What did you discuss during dinner?
During is followed by a noun, which often represents an activity (During + noun).
I had a good time during the trip.
How to Use “While”
While is a conjunction which is used to refer to a background period of time in which another activity happened.
They all took notes while the professor gave the lecture.
While is followed by a clause (While + subject + verb…)
I did it while I was drunk.
Difference Between During and While | Picture