There are some instances in which the Form 5329 is not required to be included with your return, even if an amount is appearing on Form 1040, Line 6 for Additional tax on IRAs, other qualified retirement plans, etc. This is why Line 6 states, "Attach Form 5329, if required."
Per the IRS Instructions for Form 1040, page 93:
Line 6
Additional Tax on IRAs, Other Qualified Retirement Plans, etc.
If any of the following apply, see Form 5329 and its instructions to find out if you owe this tax and if you must file Form 5329. Also see Form 5329 and its instructions for definitions of the terms used here.
Exception. If only item (1) applies and distribution code 1 is correctly shown inbox 7 of all your Forms 1099-R, you don’t have to file Form 5329. Instead,multiply the taxable amount of the distribution by 10% (0.10) and enter the result on line 6. The taxable amount of the distribution is the part of the distribution you reported on Form 1040 or 1040-SR,line 4b or 4d or on Form 4972. Also, enter“No” in the margin to the left of line 6 to indicate that you don’t have to file Form 5329. But you must file Form 5329 if distribution code 1 is incorrectly shown in box 7 of Form 1099-R or you qualify for an exception, such as the exceptions for qualified medical expenses,qualified higher education expenses,qualified first-time home buyer distributions, or a qualified reservist distribution.