I'm having a killer time learning how to build plugins

It depends what kind of element you are creating.

If it is a “Visual element”, you may return the value using “publishState”. If you want to be sure that the app handles that change, you can also do “triggerEvent” so it can respond to the change immediately.

If you are using a “Server Side” action, you may return it directly on the structure that you define as “returned values” like { “key”: “value” }.