Have you tried restarting your MacBook?
Make sure the cables are securely inserted and check for any dirt or debris in the USB-C ports.
Next, try to isolate the issue. Check if this is solely a video monitor problem. E.g., attach just a keyboard to one USB-C port to diagnose whether the problem is in fact with the port itself as opposed to, say, an external monitor detection issue. Also, when re-trying the monitor, make sure nothing else is attached, daisy-chain style, to the monitor, in case a device further down the chain is causing a conflict of some sort.
If that doesn't resolve the problem, try resetting NVRAM (or PRAM) or the SMC.
Follow these instructions for resetting the PRAM/NVRAM:
Reset NVRAM or PRAM on your Mac - Apple Support
Follow these instructions for resetting the SMC:
How to reset the System Management Controller (SMC) on your Mac - Apple Support
If the above doesn't work, run Apple Diagnostics.
To run Apple Diagnostics on a Mac, you'll need to shut down your computer and then restart it while holding down the Command (⌘)-D Keys. See Use Apple Diagnostics to test your Mac - Apple Support.