Flattening the image combines all the layer contents on a single layer, which can make the file size more compact. Use this process only if you've finished editing your image, and undo the action immediately if you've done it by mistake.
Click on Layer . The Layer menu will appear.
Click on Flatten Image . Photoshop immediately combines the contents of all the layers onto a single layer.