If the child files tax returns, he has to file a separate tax return for each year. He has to report the 2022 W-2 on his 2022 tax return, and report the 2023 W-2 on his 2023 tax return. You can't combine W-2s for different years on one tax return.
An IRA contribution can only be made for the year that the income was earned. You can't use 2022 income to make a 2023 IRA contribution. It's too late to make IRA contributions for 2022 or 2023. An IRA contribution has to be made by the filing deadline for the year that the income was earned. A 2022 IRA contribution had to be made by April 15, 2023, and a 2023 IRA contribution had to be made by April 15, 2024. So you cannot use the child's 2022 or 2023 W-2 income to make IRA contributions now.
If the child is not required to file for 2022 or 2023, and did not have any income tax withheld from his pay, there is no point in filing tax returns now. You can file the returns, but you cannot make IRA contributions for those years, and there would be no benefit to filing the returns.