When you sync a selection, then you sync/replace a new list/library of the content of that type. Not-selected content will then ‘disappear’ after the sync. You get your songs ‘back’ by including them again in the selection to sync. iTunes is smart enough to not transfer music already present on the target device, speeding up the sync process. It also depends a bit on which options you have checked in iTunes, as you could have it behave differently.
Sync your iPhone, iPad, or iPod using iTunes on your computer - Apple Support
iTunes User Guide - Apple Support
Music in your Library is in the Media or Audio category of the storage, never in the Other category.