USB is the preferred choice to connect an MCU-based device with an application running on a laptop or desktop computer. I’ve written a tutorial that introduces the relevant USB concepts and implements two sample projects. And it shows how to do it without the need for writing device drivers.
The sample projects are for an STM32 (Blue Pill), but the concept apply to all microcontrollers I’m aware of. The projects use PlatformIO and are available for both LibOpenCM3 and STM32cube. On the host side, Python is used. They are published on GitHub, of course.