Probably just a crap quality cable. Send it back and get the one I sent you or these are what I use.
https://www.amazon.com/Cable-Matters-3-Pack-USB-Printer/dp/B00UNZ9KBM/ref=mp_s_a_1_3?crid=1TUYLH67Q5QEO&keywords=cable+matters+usb+a+to+b&qid=1648828337&sprefix=cable+matters+usb+a+to+b%2Caps%2C103&sr=8-3#immersive-view_1648828395155