You didn't list information about the dongle so it's hard to find out more but I wouldn't be surprised if it's the source of the problem you're having.
Not all third party components are compatible with Apple.
These are two good places to start to find the right components:
What happens if you connect the macbook directly to the monitor without a dongle?
I don’t have a usb c to hdmi cable yet
You didn't list information about the dongle so it's hard to find out more but I wouldn't be surprised if it's the source of the problem you're having.
Not all third party components are compatible with Apple.
These are two good places to start to find the right components:
The Best USB-C Video Cables and Adapters
The Best USB-C Hubs and Docks