I had a solar panel project in 2022, but I replaced my roof in 2021 in order to prepare for the solar panels. How should I file the solar tax credit about the roof?

Should I amend my 2021 tax return or just add the roof replace cost to the solar project in 2022