Once Beoplay M5 is connected to your home network (via Wi-Fi or Ethernet), use the Bang & Olufsen app on your mobile device to access the settings of the product and accept the Chromecast built-in terms & conditions.
Chromecast built-in can be enabled at any point via the Bang & Olufsen app by selecting Product settings -> Configure -> Your content -> Chromecast built-in.
The Bang & Olufsen app is available for download here