In Windows 11, the taskbar is designed to be locked in its position at the bottom of the screen by default, and there is no direct option available in the settings to move it to the top like in previous versions of Windows. Currently, users cannot drag the taskbar to the top or sides of the screen. If you want to customize your taskbar experience, you can pin apps and manage some features through the Settings app under Personalization, but moving the taskbar itself is not supported at this time.
References: