You can try feeding your dog some different dog food that is supposed to help minimize the shedding of the dogs hair.
Chewy.com sells a brand of dog food called Natural balance fat dog food which says it can minimize shedding in dogs.
You can also buy a supplement that you can give to your dog for shedding and even buy a bodysuit called the shed defender that helps contain the shedding.
Other than that there's not really much you can do to fully stop your dogs shedding hair as it's a normal thing and even humans shed and lose their hair on their head daily which is also normal.