2 phones using same Apple ID. What happens if I erase everything on one phone? I have two phone using the same Apple ID.   Second phone was a temporary replacement, and then the first phone was found.   I want to erase all the settings and data on second phone so I can give it to another employee, with a new Apple ID.   Second phone wants me to log in with the Apple ID before it will allow me to erase everything. Will all the data be erased on the iCloud account, and also delete the data from the first phone?
Apple give fairly detailed instructions on how to prepare an iOS device for another person here...

https://support.apple.com/en-gb/HT201351

Basically, back it up, sign out of your iCloud account (and the App Store depending on the version of iOS you have installed) and then choose "Erase All Content and Settings".

Selecting "Erase All Content and Settings" on one phone will only affect that phone. It doesn't affect the content you have saved to another phone or the data in your iCloud account.