You can change your party affiliation (Republican, Democrat  or undeclared) until June 4th. After that date you cannot make any changes until after the September 10, 2024 election