Newer computers may need a USB 3.1 speed data cable to connect correctly.
Steps to check that it is not the cable causing the problem include Samsung recommends that you always use the official cable that came with your phone.
If your Samsung phone won’t connect to PC, the first step is to check the USB cable that you are using to connect it to your computer.