Capitalize "state" when it's a proper noun. A proper noun is used for names of people and places, planets, titles (Professor Smith Doctor Johnson), directions (North, South, East, West), organizations, months, days of the week, and God. Capitalize all words in headlines or titles, except for articles, (the, a, an) prepositions, and coordinating conjunctions (yet, and, so). The State of the Union is a famous speech that the president gives every year, so that would be capitalized. Some universites have "state" in the title. For example, Oregon State University. Our idiot president spreads conspiracy theories about the deep state. That's when supposedly very influential people have power over us, but we just don't realize it (Example: Bill Gates gave is responsible for coronavirus because he wants to force us all to get vaccinations so he can control our minds and take over the world.) I wouldn't capitalize it, but that's just me.
"State" is lowercase when it refers to the verb, a state of mind, or an emotional state.