Questions & Answers about Я хочу купить серую рубашку.
Why is it серую рубашку instead of серая рубашка?
Because the shirt is the direct object of the verb купить (to buy), so it must be in the accusative case. The feminine noun рубашка changes its -а ending to -у (рубашку). To match it, the feminine adjective серая changes its -ая ending to -ую (серую).
How do I know whether a feminine adjective takes -ую or -юю in the accusative case?
It depends on whether the adjective is "hard" or "soft". Most adjectives are hard (like серый / серая) and take the hard ending -ую. Soft adjectives, which usually end in -няя in the nominative feminine (like синяя, meaning "dark blue"), take the soft ending -юю to become синюю.
Why use купить instead of the imperfective verb покупать?
Because you are talking about a single, specific, completed action (buying one shirt successfully). After the verb хотеть (to want), we usually use a perfective verb like купить when we want to achieve a specific, one-time result.
Why doesn't the verb купить change its ending to match Я?