How to decide whether to use digital signature (RSA) or HMAC I found multiple posts regarding the differences between HMAC and RSA. Why should I prefer one or the other?

These are some examples:

HMAC SHA256 vs RSA SHA256 - which one to use

What are the different use cases between an HMAC and digital signature?

I am designing an SSO (single sign on) scheme to enable registration from one entity to a third party.

From my perspective HMAC should be used as we only want to check that the first entity is a known one. Furthermore HMAC can be faster than RSA (openssl speed hmac rsa gives 1 magnitude difference).



On the other hand, would it be better to use digital signatures to avoid risk case either of the two sides of the system is breached?

I have tried to look on many other schemes for similar use cases and it seems like almost everyone uses HMAC-SHA256. I am not sure if this risk is something should be considered as I couldn't find any crypto notes regarding this matter.
HMAC (and any other MAC) are totally different from Digital Signatures (RSA, DSA, ECDSA, EdDSA). 

MACs require a shared secret key that both the communicating parties have. The same secret is used to create the MAC as is used to verify it. Anyone with the shared secret key can create a MAC, and anyone with the shared secret key can verify a MAC.

Digital Signatures don't use a shared secret: Each entity has two keys, one public and one private. Only they can sign messages (only they have the private key) but anyone can verify those signatures. There's no need to exchange a shared secret.

MACs are generally much faster than Signatures. 

That said, the fact that you are asking this question indicates that you have some fundamental learning to do before even starting to design an SSO mechanism. Have you considered using OAuth? There are many libraries for various languages that support it, it's secure, and it avoids many of the hidden pitfalls you won't have thought of.