With a Microsoft 365 subscription, Outlook for Mac should not show ads in the inbox, so I would treat this as the Mac app not picking up the subscription for the account in use.
First I would check that the subscription belongs to the account signed in to Outlook on the Mac. I would open the Services and subscriptions page in my Microsoft account in a browser and confirm the subscription is active and listed under that same account.
Then I would sign out and back in inside Outlook for Mac. I would go to Settings, then Accounts, remove the account, quit Outlook, reopen it, and add the same account again. That forces the app to recheck the subscription.
I would also update Outlook from the App Store or through Help, then Check for Updates, because an older build can fail to recognise a current subscription.
If the ads still show after that, I would check whether a second account is signed in to Outlook on the Mac, because the ads follow the account that is active in the app, not the account on the Android phone. The fact that the phone shows no ads tells me the subscription itself is fine, so the problem is the Mac app and the account it is using.