Not quite sure what you mean? Do you mean how to invoke the gtag.js javascript function to set the userid? If you do, you probably want that in an on-page load workflow, or on login workflow.
You could look at that and the videos if you wanted to figure out how to do in with javascript. There is a part explaining how to set the GA4 userid with the Bubble User Unique Id. Or buy my plugin