Tools > Options > Text editor > {language of your choice} > Navigation bar checkbox
This applies to Visual Studio 2019 and 2022.