Try different cables. This is nearly always the answer. Some folks have had to try several cables to find one that works. The cable is very common, so it's very possible that a cable found in a random drawer may be poor quality or power-only which may not work reliably.
See the home page for some cable suggestions. If shopping for a cable, a keyword to look for is "sync" which means the cable can carry a signal, avoid anything that says "charging only" or "power only". Generally most cables bought separately are probably fine. I've only run into issues with cheap quality cables that came bundled with something else.
A couple more things that don't hurt to try:
Look for a light near the USB port, it may be red or green.
If there's no light, that's a bad sign. Still, the best thing to do is try some different cables just in case. If there's consistently no light, it may mean there's been some damage during shipping. Though it should be evident if that's the case.
If there is a light, that's good. That means the keyboard is likely still functional, it's just unable to communicate. Continue to try different cables.
This is better explained via video. https://config.qmk.fm/#/test is the keyboard test site mentioned in the video.