Hide the menu bar in screen capture
Leave out the menu bar on supported display and area captures.
Screen Recorder / Screen appearance
Exclude supported macOS notification windows from the recording.
See more in Screen appearance
Screen › Tidy screen › Hide notifications
Apple silicon Mac running macOS 26 or later.