@Dolly I believe, you can just create a custom dialog clientlib, and write your JQuery for the same and include that in the extraclientlib node of the dialog which will solely load the clientlib to your component.
eg:
https://stackoverflow.com/questions/57992806/how-to-show-hide-dialog-fields-with-...