There is some nuance. Wikipedia is a tertiary source for the subjects of its articles. However, it is a primary source for what is on wikipedia. You can cite an encyclopedia the same way you would cite the dictionary (which is also a tertiary source) as a way of establishing that information is in circulation.
Likewise, primary sources for some claims may be tertiary sources for others. If you read the memoirs of a soldier in WW1 who is comparing his exploits to those of a roman general from antiquity, he is a primary source for the WW1 history and a tertiary source for the roman history.
Survey articles and textbooks are generally tertiary. They may include analysis which is secondary and citable, but even then only the parts which are original are citable.
As a more general rule, you can't cite a piece of information from a work which is itself citing that piece of information (or ought to be).
Likewise, primary sources for some claims may be tertiary sources for others. If you read the memoirs of a soldier in WW1 who is comparing his exploits to those of a roman general from antiquity, he is a primary source for the WW1 history and a tertiary source for the roman history.
Survey articles and textbooks are generally tertiary. They may include analysis which is secondary and citable, but even then only the parts which are original are citable.
As a more general rule, you can't cite a piece of information from a work which is itself citing that piece of information (or ought to be).