How is window.ethereum injected?

Hello devs,

I’m working on a chrome extension and having a difficult time understanding how window.ethereum is automatically injected. Could someone help point me in the right direction? I’m quite new to blockchain dev so any advice helps.

Thank you!