"Expository writing is a type of writing that is used to explain, describe, give information, or inform" ("What is Expository Writing?").
The Expository essay can take many different forms: definition, process/sequence, cause/effect, and description (among others).
Writing an analysis requires you to consider and explain the purpose, meaning, or effect of a text's "elements or parts" as related to the whole of the work (e.g. character(s), theme(s), literary device(s), etc.)
Screenshot from: "Analyze" (Dictionary.com)
Like the expository genre, there are many different ways/ structures of writing an analysis: thematic (considering a work's theme), character (e.g. characterization or development throughout work), rhetorical (e.g. literary devices), etc.