how do I prevent being taxed on funds i received 1099Q for distribution from 529 I own for my grandson, the funds were transferred to him for a state university?

why is qualified withdrawal from 529 i took and transferred to the beneficiary for state university taxable to me?