No. Your 529 distributions must match up with your qualifying education expenses paid within the same calendar year, otherwise your withdrawal may be deemed as non-qualified and subject to taxes and penalties on the earnings portion.
https://eksassociates.com/2022/01/21/know-the-rules-before-making-529-plan-withdrawals/
Thanks for your response. I also thought the same but the last para of the following link tells me that I can take the withdrawal before 31st March of the following year:
Q&A: Can a 529 Reimburse for Last Year’s Expenses? – Marotta On Money
"For this reason, most professionals recommend that you strive to reimburse yourself for qualified expenses during the same year as the expense occurred. If you cannot achieve that, then reimburse before March 31 of the next year as a safe back-up.
That link doesn't work. I think this is what you are referring to: https://www.marottaonmoney.com/qa-can-a-529-reimburse-for-last-years-expenses/
You have to read it all. That's an old reference to a proposed rule change that never happened. Commenter was suggesting meeting the March 31 date just in case the rules changed.
As others have said, you have to match the distribution year to the tuition paid year.