Squarespace has this feature built in. You can control the opacity within the Edit Section panel for the particular section. No need to insert custom CSS.
1. Edit Section
2. Under the Format tab scroll to the bottom and the last setting option is to control the opacity of the overlay.