No, no. In Canada, if you’re interested in being involved in choosing a party leader, you buy a membership. But it is voluntary otherwise. It doesn’t have an effect in who you might vote for in a general election.
In some states you have to decide which primary you are going to vote in and you register with that party a few weeks or months before the vote. You can switch parties every election if you like. If your nominee is safe you may choose to vote in the other parties election so as to attempt make sure they get the worse candidate possible.
In others you go to the primary poll and ask for a ballot for the party of your choice.
Having to buy membership before you can vote would be illegal here.
Voting in more then one primary would also be illegal. You could go to jail. Unless you are a democrat. Then vote six or more times and they will throw you a party and give you grants. (Yes, I am a tiny bit bitter about that.)
Nor does it here.