The USB standard defines device classes.
Some classes are directly supported by the system, like some HID (Human Interface Device), as for mouse and keyboard, those are HID Mouse or HID Keyboard classes.
The COM port is a serial communication called CDC Class that is also directly supported by the system was made to keep backward compatibility with the old serial port on computers.
Some other classes are Mass Storage, for a flash dongle, and some other audio and printers.
One thing to know is that USB devices are identified with a VID (Vendor ID) and PID (product ID). You need to pay a fee to the USB foundation to get your own VID.
Then if your device needs specific communication, you can make your own driver. For example, you can make an HID Device class device that would require a driver. For USB devices usually, you can find drivers from the stack supplier (like a microchip, Atmel) and modify the .inf file to match your product VID and PID without having to write the driver yourself, but since win10 you need a driver signing certificate to sign your drivers in order to install them.
Often on a simple dev board, COM Serial is the most used communication standard because it's easy to implement, although not the best as you have to parameterize the system (set com port, baud rate...).
If you want to keep the COM port. a trick on Windows (and probably on other platforms), you can list the com port and find their VID and PID if they are USB. This way you can find what COM port is your device without needing user input.
Better if you make your own device driver, you can implement that with many micro-controller like Atmel, Microchip amongst many others. You can download the USB stack code and get started. The best way is to start with some dev board from a specific vendor.
Overall, now most of the microcontroller manufacturers will provide the USB stack, and is often "easily" done through some configuration and a bit of code.
USB might seem a bit dompting when you want to make your own driver and it takes some time to have everything figured between firmware, hardware, driver, but it's worth it if you want to make any sorts of device that communicates with a computer.
In 2020, I still see so many, even recent, industrial equipment using the old COM port as the engineer didn't know better, and always gives the feel that the equipment is subpar. Isn't that neat when you connect your device that it lists itself with the device name, your company name and that the software automatically finds it rather than having an old COM configuration window from the 90s?