They wouldn’t be generating hydrogen on the spot (i.e., in the plane). Likely, it would be hydrogen introduced from storage tanks on the ground into the plane, and it would either be highly compressed or more densely stored in some sort of metal hydride material where the stored hydrogen could be released as needed by heating.
Of course. That's why such terms are entering the media vocabulary such as "green hydrogen" and "blue hydrogen" and more. Because words are so much better at snake oil sales than are those darned equations and "stored" hydrogen. After all "stored" jet fuel....