You are editing a family file and select elements to delete. You notice the Delete tool is grayed out; you cannot delete these elements in the family. How did the family get to this current state?
By default if you start a new family file, add some elements, save the family, navigate to the family file, and rename the extension from .RFA [Family File] to .RFT [Family Template File] the elements you added in that file will now be locked from deletion if you create a new family from this template.
Or simply take an existing family and rename the extension using the same process as above.
What if you need to delete these elements?
When considered a template and you start a new family file from this template, the elements from the template will be locked from deletion. If you simply make a copy of the file, and rename the extension back to .RFA, you can open the file normally and delete any of these elements. If needed you could rename the extension back to .RFT afterward to set it back as a family template.