Closing our son’s 529

Our son has a 529 account we’ve set aside for him but has a scholarship that covers his university tuition and books.  I have heard that he can have money taken from this with no tax penalty even though he isn’t in need of it for college expenses.  If I distribute to his name how do I handle his taxes for 2021?  Should we clear all of the account prior to his graduation?  Do I somehow show his scholarship and the distributions on his return?