It IS required to have earned income to get the refundable portion of the child tax credit.
There were special rules for 2021, and you could get it then, without earned income. But, not for 2022 and 2023.
The child tax credit (CTC) is limited to your tax liability. The CTC is a non-refundable credit and can only reduce your income tax to 0, It can not help you beyond eliminating your tax liability. But, if you have more than $2500 of earned income, some or all of it is usually given back to you thru the "Additional Child tax credit". That is, part of the CTC may be on line 28 of form 1040 (2021- 2023) instead of line 19. The ACTC is calculated on form 8812 and is basically 15% of your earned income over $2500. The ACTC is a maximum of $1600 (2023) ($1500 for 2022) per child, not $2000.
In order to get the CTC for 2022 or 2023, you must have income from working. If you did not work, you cannot get child-related credits.
AND….If you have children but had little or no income, it raises the question of how you and the children were supported. There may be another tax-paying adult who can claim you and/or the children as dependents.