Setting layer transparency in QGIS 3?
You have to click on the layer rendering arrow (see the bottom of your second image) to access the slider and other option.
in QGIS 2 it was on by default, in QGIS 3 it's off by default...
As an alternative option, you can open Legend
tab and select Opacity slider
widget.
It will add an opacity slider in the Layers panel.