In general, the best way to remove a device from Hubitat Elevation is to navigate to Devices, find your specific device to navigate to its device detail page, then select Remove (towards the bottom of the page). Follow the prompts that appear. Z-Wave devices will need to be placed in exclusion mode, requiring physical access to the device. Zigbee devices may need to be manually reset afterwards to pair, or many will be reset if they are "online" when the device is removed.
Steps for LAN, cloud, and other integrated devices may vary. Consult the documentation for the integration app in question if unsure (if the device is added via an integration app).