A. You have several options:
1. If due to Scholarship
If the leftover fund is due to your child received scholarship, you can withdraw the fund by only paying income tax on the earnings, but not the 10% penalty.
2. Use for other people
You can repurpose the 529 funds for other people, including yourself, for eligible education purpose by naming that person as the beneficiary.
3. Close the account
You can close the account by taking the money out, but you will have to pay income tax on earnings, plus the 10% penalty.