Hello @Kaushik1 and welcome to the community,
That depends on your application and needs.
To summarize a comparison between the two options:

SMPS are more efficient than LDO, especially with the important input/output voltage difference.
LDO are low-cost and easy to implement, where SMPS requires a coil and more space on the PCB.
LDO generates less noise than SMPS. So if you have ADC, DAC, and other analog functions better to select LDO.
High PSRR LDO can be used on the output of a SMPS to reduce switching noise while achieving good efficiency.
You can refer to this wiki: https://wiki.st.com/stm32mcu/wiki/Basics_of_power_supply_design_for_MCU
Hope it helps.