I think you are confusing the microcontrollers with microProcessors.
microProcessors running operating systems like linux usually have low level drivers implemented at kernel level and high level user code (aka application code) implemented at user space.
In microControllers, the terminologies commonly used are baremetal (lowest level), middleware (abstraction usually provided by OEM) and then user application.
If I'm to interpret your question, you want to develop an ethernet driver for STM32 BluePill. Firstly as @Justme mentioned, there's no onboard ethernet support on bluepill however you can get an external ethernet module and communicate with it via SPI. This means what you really want is SPI driver which can handle data packets sent by Ethernet Controller IC.
If you are a complete beginner, I suggest you start with hooking up a simple SPI sensor with your bluepill and understand the SPI comms first. You can rely on ST tools like STM32CubeMX and IDE to speed up your learning. Once you've familiarised yourself with the basics, only then start working on ethernet side.
Implementing ethernet stack on microcontrollers is a very involved process and required a level of experties. I suggest building your foundational knowledge first.