First we need to connect to exchange online via a Powershell terminal
Connect-ExchangeOnline -UserPrincipalName [email protected]
Then to hide a group from Outlook, enter the following command
Set-UnifiedGroup -Identity "GROUP NAME" -HiddenFromAddressListsEnabled $true -HiddenFromExchangeClientsEnabled
If you would also like to disable the welcome message when added to a group, enter the following command
Set-UnifiedGroup -Identity "GROUP NAME" -UnifiedGroupWelcomeMessageEnabled:$false