I'm trying to figure out how to ask where I can buy something. From the lessons I've taken so far, what comes to mind is どこに＿を買いますか？ Google says this translates to "Where should I buy a ＿?" which would be acceptable in English, but I guess it's not conveying what I want to say exactly. Would this be the correct way to ask in Japanese or is there a better way to ask "Where can I buy [something]?"
Most commonly (and simply), we would say:
Note that it is 「どこで」 and not 「どこに」.
Also, 「買えますか」 would be more natural than 「買いますか」 for "can buy".
You can also say
Xはどこで売っていますか。 → Where do they sell X?
The implication (obviously) is that if something is being sold, then you are able to buy it. That being said, you wouldn't use this form if you're wanting to buy something that is not commonly sold (rare/uncommon items, illegal items, etc.)
So you have to use a bit of common sense here: if you know it's something that is not readily available to the general market, don't use 売っています. Then you'd need to use 買えます ("can buy") as explained in the other answer.