I don't remember if it's Roland or Korg, but one of those two companies (I want to say Korg) has a USB-MIDI driver installation program that shows all USB-MIDI devices which have been installed (i.e., set up) on all USB ports.
The thing is, if you connect a USB device to a USB port and the system adds Windows Registry entries for it (i.e., sets it up), but then you connect that same USB device to a different USB port, the system will add more Windows Registry entries for it. I don't pretend to understand the details, but it has something to do with the fact that each USB drive has its own identity within the system. Furthermore, the entries will be left in the Windows Registry-- as opposed to being automatically deleted if you disconnect the USB device-- so the system doesn't have to set up the device each time you connect it to a USB port.
Anyway, there's a limit to how many MIDI ports can be used at the same time in Windows; I don't know whether or not this is also true of macOS, iOS, Linux, etc. If your Windows machine has multiple USB ports, and/or if you've connected several different USB-MIDI devices to those USB ports, the system can think that you've already set up the maximum number of MIDI ports, even if all or most of those MIDI ports aren't currently connected and in use. So the Korg(?) driver utility will show you all of the MIDI ports which have been set up in the system and let you delete any that you no longer need, thereby freeing up slots so you can set up new MIDI ports.
By the way, a single MIDI device might be counted more than once, because each MIDI IN port and each MIDI OUT port is counted separately. The limit is 10 MIDI IN ports and 10 MIDI OUT ports. So if you have a keyboard that has 2 MIDI IN ports (A and B) and 2 MIDI OUT ports (A and B), it would use up 4 slots in all-- 2 of the 10 MIDI IN slots, and 2 of the 10 MIDI OUT slots.
On the other hand, some types of MIDI devices might count only once, either as a single MIDI IN port or as a single MIDI OUT port. For example, a MIDI controller might have a single MIDI OUT port but no MIDI IN port, so it would use up 1 MIDI IN slot (since its MIDI OUT would be seen as a MIDI IN from the computer's perspective). In contrast, a MIDI sound module might have a single MIDI IN port but no MIDI OUT port, so it would use up 1 MIDI OUT slot (since its MIDI IN would be seen as a MIDI OUT from the computer's perspective).
Also, the Windows OS includes a built-in MIDI soft synth (the GS Wavetable soft synth) so you can play back MIDI files by double-clicking them, and it uses up 1 of the 10 available MIDI OUT ports. Thus, you can actually set up only 9 additional MIDI OUT ports-- unless you remove that built-in soft synth.
However, I would tend to doubt that any of this is relevant to the OP's specific problem, since I would assume that they haven't connected enough USB-MIDI devices to the laptop to have used up the 10 available MIDI IN slots.
Addendum-- That Korg(?) driver utility can be used to remove old MIDI devices from the system regardless of what brand keyboard you've got.