I thought my thunderbolt port wasn't working on my iMac Retina 4K 2019.[br]
It turns out I had to give permission to my iMac to give it access to a peripheral (audio interface - Universal Audio Apollo X8P)[br]
through the OS's preferences.
It was something I had to call a technician from Apple about. They didn't really understand the problem.[br]
I persisted at solving it, referring to the manufacturer of my audio interface's website and instructions.[br]
Otherwise, I suggest you install the latest OS.