When the custom module is rendered, an unique id is attached to the HTML div component with the format hs_cos_wrapper_widget_1538643526534 .
All modules have their own unique ID when rendered and contains its content in it.
If you’d like to get unique id of module then please try below:
hs_cos_wrapper_{{ name }}
Ex:
#hs_cos_wrapper_{{ name }} .hero_banner {
background-image: url(sample.png);
}