Like I said, expressions nor scripting can alter the styling of parts of a text-layer. You can only style the entire layer, not a word or selection within it.
There exist solutions of marking a [part of your text] with characters like those square brackets, then hide them but use their indexes to create animation ranges, which can do limited things like change the color, add a stroke, slant,… but not actually change font properties like in the character styling.
It’s a question that gets asked quite often on the forum, unfortunately the search seems broken now, so I can’t point you to a solution right now.