I have the game for console and I know later this summer there will be a cross save. But I am asking about the game, will I have to repurchase it for PC or since I purchased it from Xbox, will it transfer
If your switching to PC from console, here is all you need to know about purchases and what you'll need. Year 1 Content + Base Game is free Forsaken + Year 2 Content is $40 Shadowkeep + Year 3 Content with Deluxe Edition is $60 You don't need to buy Forsaken if you just want to play Shadowkeep and all of the items you have already earned on console during Year 2 can still be used and aren't locked, however, you won't be able to do Last Wish, or other exclusive content like forges without purchasing Forsaken.
You still need a license for the game, meaning yes, you will have to buy it again.