Turn off the screen after inactivity

I would like to know if it is possible to set up an automatic shutdown of the screen after X minutes of inactivity or to lower the brightness ?

Best regards

maybe you can have a look to following topic if it is helpful https://dietpi.com/forum/t/enable-screensaver-blank-screen-for-rpi-touchscreen/3126/1

thank you very much for the information