Depending on your PS4 share button control type (you can change this in the PS4 settings) either press and hold the share button, or just press the share button to take a screenshot. If you want to remove the HUD in train sim world you'll have to use a USB or bluetooth keyboard and press F1.