During vs While! During and While are similar in meaning (function), but they are used different grammatically.
During vs While
Is During a Preposition?
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.
Is While a Preposition?
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.