State tax filing

I am very confused by all of this Line 17 and Line 18 on the Student worksheet.  We only had $2023 that was not covered by scholarships.   We had $1090 from a 529 plan.  I used the form mode and it put all the $2023 on line 17 and I was to get a larger refund.   I then went through the step by step  and it put all the 2023 into line 18 and my refund was about put in half.  We had to do this quite a few years ago with our oldest but I don't remember anything like this before.   Can someone guide me on what I should do?

 

Thank you!