Excuse me, do you know where the bathroom is?
✅ : Desculpe 
❌ : Com licença

Please excuse me from the table.
✅ : Com licença 
✅ : Desculpe (not the first choice, but also usable)

Saying “excuse me” after burping.
✅ : Perdão, Desculpe 
❌ : Com licença (only if you want to burp unapologetically!)

Saying “excuse me” when trying to get through a crowded area.
✅ : Com licença, Desculpe
❌ : Perdão (not the first choice, but also usable)

Sorry, do you know where the bathroom is?
✅ : Desculpa/desculpe 
❌ : Com licença

Sorry, I didn’t hear what you said.
✅ : Desculpe 
❌ : Com licença

Sorry for messing your drink.
✅ : Desculpe
❌ : Com licença

Mom: Did you eat the cake? Me: Sorry.
✅ : Desculpa/Desculpe 
❌ : Com licença

Also:

When entering someone’s house, closing the door on someone or hanging up the phone:
✅ : Com licença 
❌ : Desculpe

Se faz favor = please.

Source: How do you say “ excuse me” in Portuguese? Is it “com licença”, “ se faz favor” or “ desculpa”? | HiNative