When generating code using LL libraries for an STM32L011F4Ux MCU, I found that enabling DMA for USART2 RX and TX and selecting DMA channels 2 and 3 makes the Cube create non working code.
I checked the RM for this MCU and at chapter 10.4.7 "DMA channel selection register (DMA_CSELR)" I saw that channels 2 and 3 are not the right ones for USART2.
Anyway, the Cube lets you select the right channels (i.e. 4 and 5) and, with those, everything seems OK.
Can you please check?