There are different masking options in Photoshop. Masking is not a basic level of editing, so you need to develop masking skills first, and then you can expect a smooth outcome.