Cut and paste this URL to share the unmodified register and value:
https://regviz.com/r/STMicroelectronics/STM32U031/TIM2/TIM2_AF1#0x0
ETRSEL=B_0x0
TIM2 alternate function option register 1
ETR source selection
0 (B_0x0): ETR legacy mode
1 (B_0x1): COMP1
2 (B_0x2): COMP2
3 (B_0x3): LSE
4 (B_0x4): MCO
5 (B_0x5): MCO2
https://github.com/cmsis-svd/cmsis-svd-data