Solid or creamy
TSA has two entries. “Cheese (Solid)” is a yes for both bags. “Cheese (Creamy)” is a yes in your carry-on only at 3.4 ounces or less, and a yes in your checked bag.
A block of cheddar or a bag of string cheese is solid. Cream cheese, or a cheese spread you’d put on a cracker, is creamy.
Flying home from abroad
TSA’s answer covers screening at US airports. On the way home you go through the other airport’s screening first, and its rules are the ones that count there.
Coming home through US customs
USDA lists “solid hard or soft cheeses” among the foods that may enter from any country, as long as the cheese has no meat in it and doesn’t pour like a liquid. USDA’s examples of cheese that pours are ricotta and cottage cheese.
That exemption is for cheese. Most other dairy from countries with foot-and-mouth disease isn’t allowed, which is why yogurt gets a different answer.
Declare it either way. USDA says declared food brings no penalty, even when it’s refused. What happens if you don’t.
TSA puts this on every entry: “The final decision rests with the TSA officer on whether an item is allowed through the checkpoint.”