It's not the taskbar, it's the start menu.Have you tried this >>Press Win + R , type or paste gpedit. msc in the text box, and press Enter . Navigate to User Configuration > Administrative Templates > Start Menu and Taskbar. Double-click the Do not allow pinning programs to the Taskbar policy, and set it to Enabled.
This procedure does not work on Windows 11, only on Windows 10Here we’ll show you another two ways to restrict users from rearranging, pinning or unpinning tiles from Start Menu in Windows 10.www.top-password.com
Thanks, but that's not what I need.If you want to change anything, head to Settings > Personalization > Start, where you can tell Windows to stop showing recently installed apps, frequently used apps, and recently opened items in the Start menu, App List, and elsewhere. Experiment with each of these three options to determine which ones to turn on and off. If you turn all three options off, the Recommended section of the Start menu will be empty.
Not sure if this is what you are wanting but thought i'd post it !