voiced uvular fricative [ʁ] is nowadays the common pronunciation of "r" in High German.
uvular trill [R] is used if you want to emphasize the "r", or if you want to achieve a clear pronunciation in a more formal speech or conversation. In most contexts it is harder to speak and thus avoided.
Both originated from a weakening of the alveolar thrill and got used in educated speech out of convenience and because of the reputation of French where its use was also spreading.
alveolar trill [r] is commonly used by older speakers but it got deprecated because of its association with rural, uneducated people. Educated people in the cities and the nobility of the various German states were Francophile for a long time and adapted a lot of French habits. It loses ground to [ʁ] and [R], but is still very common in the southern areas of German.