Based on the custom field value selection component need to updated on post function(the user provides this in the input and custom field has drop down values).
https://library.adaptavist.com/entity/update-priority-based-on-a-custom-field shows you how to read your custom field, and you can see how to set a system field like component from it as well (components expects an array of components though, not a single value)
Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their Jira Cloud instance. ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events