The type
Quark is found in dialectal use in Bavaria and Switzerland, while in Austria,
Topfen is predominant.
Quark represents the standard variant in High German, which may be one reason why it is increasingly replacing the basic dialectal form
Topfen.
Middle German varieties originally borrowed the word from the North Sorbian
twarog, which is how it entered New High German. In Middle High German it is still attested as
twarc (cf.
Kluge under
Quark;
DWDS under
Quark).
Seebold, Elmar (2012): Kluge. Etymologisches Wörterbuch der deutschen Sprache, Berlin, DeGruyter
Berlin-Brandenburgische Akademie der Wissenschaften (Hrsg.) (2004-): Das Digitale Wörterbuch der deutschen Sprache, Berlin
Link