In most states, only party members can vote in their party’s primary elections.
Primary elections are held before the general election to pick the party’s candidates for the general.
Maybe he wanted to vote against Trump several times: both in the primary and main
That’s kind of true, but it depends. Most states don’t have laws requiring closed primaries and allows the party to choose which voters to include. However, in general the Republican party tends to have closed primaries when possible.
They are closed in Pennsylvania, though.
https://www.ncsl.org/elections-and-campaigns/state-primary-election-types
In most states, only party members can vote in their party’s primary elections.
Minor point of clarification:
Pennsylvania is one of only 14 states with closed primaries