Claiming newly migrated in-laws

My in-laws migrated to US on green card on Christmas day and been living with us. Can I claim them for 2021? Someone said after they get government benefits then I can't claim them, like for 2022.