Gibbs free energy

iScience
the gibbs free energy is defined to be H-TS. In my thermo book, it says that if i were to create a system out from volume V=0 at constant pressure and temperature, the work that i would need to provide is G=H-TS. But for constant pressure i thought the work terms in enthalpy cancelled out and were zero and that all that was left was the heat (Q), i thought that's what made the enthalpy quantity useful. why then does the H-TS quantity have work in it? ie, i thought H-TS would just be Q-TS but apparently it's not.. why is this not true?

$$G = H - TS = U + PV - TS$$