How to debug current consumption with STM32 Nucleo board?
I suspect the unexpected current is being used by peripheral clocks.

The code generated by STM32CubeMX enables a bunch of clocks during initialization and leaves them running. Even if a clock is necessary to configure a peripheral, that clock can often be disabled afterwards (assuming you don't need that peripheral, of course!)

Go through your initialization code, noting which clocks get enabled. I'm using another family of STM32L's, not your STM32L0, but the commands should be similar. Look for something like LL_AHB1_GRP1_EnableClock(), or perhaps RCC_APB1PeriphClockCmd(), etc.

It's probably worth doing a text search for AHB and APB, to make sure you don't miss any. If you exclude the STM libraries from your search, the results shouldn't be overwhelming.

Also, there are some clocks which activate automatically. For example, if your WDT is active, it will force on a clock to use as its time base (likely the LSI clock).

There is a list of peripheral current consumption on page 61 of your linked datasheet.