ROTH contribution on Jan. 1, even if income earned not until June?

I will be spending the winter of 2022 writing, but will not be earning income until June 2022 - can I contribute the full $7k to my ROTH (I'm over 55) on January 1, 2022? Thanks.