I am preparing my return, and beforeentering 1099Q, I was told we don't qualify for education credits due to high income. Is 1099Q taxable? Horror!

I am concerned because for 2019, IRS audited us over 1099 Q and demanded taxes on earnings. Then they corrected, but still asked for the penalty that we paid although we didn't think we owed it.