Later, you can re-enable the taskbar on all your monitors if you want.
Set Windows 11’s Taskbar to Auto-Hide With Multiple Monitors
To turn off the taskbar on your additional displays, first, launch the Settings app on your PC by pressing the Windows+i keyboard shortcut.
In Settings, from the left sidebar, select “Personalization.”
On the right, in the “Personalization” menu, choose “Taskbar.”
Scroll the “Taskbar” menu to the bottom. There, click “Taskbar Behaviors.”
In the menu that opens, disable the “Show My Taskbar on All Displays” option.
Tip: In the future, to bring the taskbar back on all your displays, enable the “Show My Taskbar on All Displays” option.
And that’s it. Windows 11 will no longer display the taskbar on your secondary monitors. Your primary monitor will still have it (you can hide the taskbar on there as well if you want).