You need to learn to use your calendar. I mean both the concept and the actual app like google calendar.
You need to do you “light management” in prescheduled meetings that are on the calendar, and you need to fill the space around those meetings with tasks, so that other people don’t interrupt you during those times.
Tell everyone that if they want your time, they need to book an available slot on your calendar first.