I'm trying to get Minecraft on my pc so I can mod. I have paid for it on Xbox, but it's saying I need to buy it again. I am on Windows 7 so I don't know if that is a problem or not.
The problem here is that you're using the "Bedrock Edition", which only works on XBox, Playstation, and Windows10, and also suffers from less support with mods. The cheapest option would be to purchase a copy of Minecraft "Java Edition", which is the main edition for PC, and mod that, as purchasing a copy of Win10 is upwards of $100.