The custom state holds items of a certain “type”, whereas a text input can only provide a text value - the custom state will not recognise it as it is not a “thing” in the database.
In your workflow you have it almost right, just need to do this in your set state value:
…:plus item → Do a Search for → (select the item type of the “source custom state” and search for a field that equals the given text input.)
Emma had the same question recently - check this thread.