Hi, my name is Anderson Souza, I hope I can help you with your issue.
Many can be the cause of the problem with your Taskbar in Windows 11, I recommend you to read the page below that contains a series of procedures that can help to solve your problem, if I understand correctly, after a Windows 11 update, the problem started happening, if that's the case then you could start by trying "FIX #11":
https://nerdschalk.com/windows-11-taskbar-not-s...
Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.