Since I work with computers a lot, I know that there are plenty more things you could reasonably ask about a hard drive - and that counting gigabytes is a trifle unambitious in these times of multi-terabyte drives.
As other answers have noted, you should ask "how big" rather than "how many GB" or "what GB", though of those two, "how many gigabytes" is more correct. But what I would do instead is to produce a list (or display) of relevant products in stock, and invite the customer to choose between the possibilities.
Such a list is likely to contain external drives for the desktop or for portable use, internal mechanical drives in 3.5" size for desktop computers or 2.5" for laptops, and several ranges of SSDs (solid-state drives) in 2.5" and M.2 formats. Each will be in a range of capacities - some of the smaller SSDs might be 120GB, while 3.5" HDDs go up to 8TB now (that's 8000GB).
At this point, a tech-savvy customer will know what he wants and will immediately choose something, or ask pertinent questions of his own. He'll appreciate your efficiency.
But a less assured customer might need help choosing, and that's when you start asking about their budget and intended usage. They probably won't have a specific capacity in mind!
For basic uses like "homework" or "email", you would select a product near the bottom of the price range that fits their computer. For "video editing" you should go straight for the 8TB monsters. For "gaming" you could recommend a combination of an SSD (for performance) and HDD (for large games), using their budget as a guide.
Cust: I need a hard drive.
Shop: We've got lots of hard drives. What kind do you need?
Cust: What's the biggest one you've got?
Shop: We have an eight-terabyte model. Here it is.
Cust: Perfect! I'll take three.