If you need additional USB ports for your computer, you should use a powered USB hub. It's best to plug your audio interface directly into your computer (not in the hub) for better processing and clear output.
Depending on your Mac, it might need the help of additional power. Sometimes the laptop can power those devices ok, sometimes it’s just on the threshold and it will cut out, or vary between showing connected and disconnected. A non-powered hub would be even worse because then one USB port is trying to power more than one device.
Check out the graphic below for more information about how to connect your keyboard and computer: