You really don’t need to use the state_attr and states functions here. The point in using them is to handle the situation when the entity or attribute doesn’t exist. But that won’t (or generally won’t) be the case here. (I think the only case where trigger.to_state will not have a valid state object is when the entity is being removed, in which case trigger.to_state will be None.)
But if you really want to, you could use trigger.entity_id, e.g., {{ states(trigger.entity_id) }}.
Note that putting quotes around trigger... just turns it into a string. You want to use it as a variable, which it is.
Also note that trigger.to_state.name is a shortcut for trigger.to_state.attributes.friendly_name, or trigger.to_state.entity_id if the entity doesn’t have a friendly_name.