@CarolB1 It shows you in the video @Blessed4life posted. However I will also detail the steps here:
1. Turn off the device.
2. Connect To Computer or plug in USB-C Headphones , Press and hold the Volume Up key and then press and hold the Power key .
3. When the Android logo displays, release all three keys.
4. An 'Installing system update' message will show for 30 - 60 seconds before the Android system recovery menu options appear.
5. Press the Volume down key several times to highlight wipe cache partition.
6. Press Power key to select.
7. Press the Volume down key to highlight yes, them and press the Power key to select.
8. When the wipe cache partition is complete, Reboot system now is highlighted.
9. Press the Power key to restart the device.
I do not work for Samsung or make Samsung Products but provide independent advice and valuable contributions.
My Device- S21 Ultra 5G ( SM-998B/DS ) CSC= BTU , 12GB/256GB
One Ui 5.0,Android 13 .
@CarolB1: If the problem persists following the wiping of the cache partition, then the issue may be stemming from a third party app. What I'd recommend is checking the Settings > Display > Adaptive brightness after launching any third party apps you use regularly, to see if the feature is disabled. If you're able to identify the relevant app, head to Settings > Apps > Select the app > Change system settings > Allow permission, and toggle this option off. Let me know how you get on.