Some tips found from jQuery theming https://learn.jquery.com/jquery-ui/theming/
Example in Drupal 9
To override the jQuery UI Accordion module’s CSS:
- Declare in your theme’s YML library the same CSS file provided by the module: jquery-ui.theme.css
- Copy the same CSS from the module
- Override, adjust as needed