The connectivity here is entirely wrong.
Those are supposed to house jumpers connecting the On-board ST-LINK to the STM32F407
One side of them connect to the F103 on the board.
Pull a schematic for the board, and review.
Should be able to find under "CAD Resources" tab of STM32F407I-DISC product page.
Make sure you've got a viable USB Cable and Port, not a charging cable.
Put the jumpers back on these pins, as it was delivered.
Install STM32 Cube Programmer
Make sure the ST-LINK is found under Device Manager
Try to connect with STM32 Cube Programmer
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..