The technology behind this is called BIMI or Brand Indicators for Message Identification.
Simplified it is an SVG, a TXT record in your DNS server and a certificate.
The certificate unfortunately currently costs around USD1000 per year. š
There is a lot of resources available at Bimi Group including a generator for all entries.