Yes you can use different types of external speaker systems with your iMac.
They can plug into the Headphone jack.
They can plug into a USB port.
They can connect Bluetooth.
If you have external speakers for your iMac.
What speakers do you have and how are they connected..?
What does "Apple > System Preferences > Sound > Output" show..?
If things are not working as expected, try resetting the SMC and NVRAM.
To reset the iMac's SMC..
see > Reset the SMC of your Mac - Apple Support
- Shut down your Mac, then unplug the power cord.
- Wait 15 seconds, then plug the power cord back in.
- Wait 5 seconds, then press the power button to turn on your Mac.
To reset the iMac's NVRAM..
see > Reset NVRAM on your Mac - Apple Support
- Shut down your Mac.
- Turn on your Mac, then immediately press and hold these four keys together: Option, Command, P, R.
- Release the keys after about 20 seconds, during which your Mac might appear to restart. For example, you might hear a startup sound more than once, or see the Apple logo more than once.
- When your Mac finishes starting up, you might need to adjust any system settings that were reset.