My iMac (21.5 inch 2017 model, 3.4 GHz) had a fusion drive, and I upgraded the ram to 32 GB and replaced the 1 TB drive with a 500 GB SSD. Using Apple's instructions for fixing a fusion drive (https://support.apple.com/en-us/HT207584), I merged the "blade" drive and the SSD into a new fusion drive. I then restored from a Time-machine backup, and reset the PRAM and SMC. The USB-C ports did not work with my external display when I used a USB-C to HDMI adapter and cable that had worked before, but when I tried another adapter, the problem was resolved. Both adapters were supposedly exactly same, as I had purchased one for my iMac and one for my laptop (https://www.amazon.ca/ICZI-Aluminum-Thunderbolt-Compatible-ChromeBook/dp/B01MT44TQS/ref=sr_1_4?s=pc...-4&keywords=usb+c+adapter), but only one worked. The adapter and cable that you are using to attach to your monitor may be the issue.