Roth contribution for last year

If I do not have a Roth IRA, can I still open Roth IRA account and contribute for both 2023 and 2024 now, before April 15? Or does the account have to be open in 2023?