Hi, Peter, I'm trying to explain you with a lot of examples for you to understand very well and definitely:
✔ Qué is used when asking for definitions.
→ ¿Qué es una ciudad? What is a city?
→ ¿Qué hace un presidente? What does a president do?
→ ¿Qué significa "talanquera"? What does "talanquera" mean?
✔ Qué normally is most often used before nouns (although cuál isn't necessarily incorrect and you will hear it sometimes used to mean "which"):
→ ¿De qué color es la camisa? What color is the shirt?
→ ¿Qué casa prefieres? Which house do you prefer?
→ ¿Qué libro leíste? Which book did you read?
✔ Cuál usually is used before es and other forms of ser when not seeking a definition:
→ ¿Cuál es tu número de teléfono? What is your phone number?
→ ¿Cuál es tu problema? What is your problem?
→ ¿Cuáles son las ciudades más grandes? What are the biggest cities?
✔ Cuál is used to suggest a selection or choice from among a group:
→ ¿Cuál miras? Which one are you looking at? But, ¿Qué miras? What are you looking at?
→ ¿Cuál prefieres? Which one do you prefer? But, ¿Qué prefieres? What do you prefer?
→ ¿Cuáles quieres? Which ones do you want? But, ¿Qué quieres? What do you want?
→ ¿Cuál es el más caro? Which is the most expensive?
→ ¿Cuáles son los más caros? Which are the most expensive?
✔ Qué has some common idiomatic uses:
→ ¿Qué hora es? What time is it?
→ ¡Qué lástima! What a shame!
→ ¡Qué hermoso! How beautiful!
→ ¡Qué día más horrible! What a horrible day!
→ ¡Qué susto! What a fright!
→ ¡Qué bonito! How pretty!
→ ¿Qué tanto? How much?
→ ¿Y qué? ¿Y a mí qué? So what?
→ ¿Para qué? ¿Por qué? Why?
I really hope this helps you, Peter. All the best!