Hydraulic brakes are excellent for many reasons, but one of the main ones is that since they're a closed system they need very little maintenance. But like everything, eventually they're going to need a tweak or two and the main bit of maintenance hydraulic brakes need is a re-bleed.
Bleeding brakes essentially means flushing the hydraulic system to try and remove any air that's trapped. Any air trapped will cause the levers to feel spongey and means that your brakes wont be as powerful and reactive as you want or need them to be. Bleeding isn't a difficult thing to do, but it can be a hard skill to master so here Park Tool's Calvin Jones shows to you how to bleed Shimano hydraulic brakes for both flat and drop bar bikes.
If you have an MTB or hybrid with Shimano flat bar brakes (like Deore, XT or XTR) then the above video is the one for you. But if you have a road or gravel bike with Shimano drop bar brakes (like 105, Ultegra, GRX or Dura-Ace) then the below shows you best practice for bleeding them.
Dont forget, Park Tool have loads of helpful bike maintenance videos over on their YouTube channel, that cover everything from simple fixes like adjusting rim brakes, to more complicated subjects like suspension fork maintenance.
They have a specific playlist for their 'Repair Help' series that you can find here, and plenty of other useful videos that you can find if you search their channel.