To remove a folder (label) without deleting its contents, navigate to Settings → See all settings → Labels. Then, click "Remove" next to the unwanted label. This action will remove it from the emails but won't delete the emails themselves.