«Яки́й» is adjectival pronoun, it changes to match the gender (який is masculine, feminine is яка́, neuter is яке́) and the number (plural form is які́) of the noun itʼs related to. It can also be translated «which» sometimes.
«Що» behaves like a noun.
Addition to szeraja_zhaba's answer:
Який ваш улюблений десерт? = Який [десерт] ваш улюблений десерт?
Який десерт is a subject, який on itself cannot be one, it's only modifying the word десерт which is happily omitted
Що є вашим улюбленим десертом? (nobody speaks like that, sounds very official like a questionnaire)
Що is a subject here, but to avoid confusion with the former grammar pattern є is sort of required which makes it less common.
So then you can't really translate this as "Which is your favorite dessert?" With який (often meaning which) I'm thinking that we're looking at a tray of desserts at a restaurant and not just being asked by someone in a conversation about desserts if I have a favorite one.
Yes, you're right. "Який" doesn't mean "which", it's equivalent to "what" for adjectives, while "що" is "what" for nouns.
You can say either "Що є вашим улюбленим дезертом?" (lit. What is your favorite dessert?) or "Який дезерт ваш улюблений?" (lit. What [kind of] dessert is your favorite?).
To ask which we use "котрий": Котрий дезерт ваш улюблений?
Or, alternatively: Який із дезертів ваш улюблений? (which one of the desserts)