I mainly play Minecraft Java but I also want to buy bedrock Edition for my PC, which I have on my mobile phone but not on my computer. If I buy this now and buy a new PC in 2 weeks, will I have to buy it again?
No you don't have to. You can also play Minecraft Windows 10 Edition on your new PC by signing in to your Microsoft account.
Hope I could help