Hi! If you purchased Minecraft for Windows, you won’t need to buy it again as long as you install it on a Windows PC using the same Microsoft account you used to purchase it (sign in to the Microsoft Store and install it from Library / Owned).
Just keep in mind that this purchase doesn’t transfer to other platforms, for example Xbox, PlayStation, Android, or iOS use separate store licenses, so you’d need to purchase Minecraft again on those devices (and in some cases you may also need the relevant subscription for online play, depending on the platform).