For device's (running Android 12) that doesn't show Extra Dim toggle button you can follow the below steps,
1. Download shortcut maker app
2. Open the app and click Activities
3. Then type 'Extra Dim' in the search bar.
4.you will find 2 options like below click the second option
5.After you click the second option it will show 'Extra Dim' like below click it
6. After that click 'Try this shortcut '
7.it will look like this.enable all 3 buttons.you can adjust the intensity as you like
9. Then a Accessibility button like below will show on you screen.
10. You can use that button to quickly turn on and off Extra Dim.
11. Touch and drag the floating accessibility button towards the edge of the screen to make it smaller.
it will show like this