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. Consult the manual for your device if you are not sure how to perform these steps on the device.
Steps for LAN, cloud, and other integrated devices may vary. Often, no special steps are required to remove these devices. Consult the documentation for the integration app or driver in question if unsure.