I am trying to use the pre-built embed code in COVID-19 tracking US sample to create a customised report, but can't publish on the web. Need some advise/help please.
Since January 2020 Publish to web by default is disabled. You need to get a permission from the admin of your tenant to be able to use it.
In Tenant settings
they can change the option Choose how embed code work
:
From there, your admin can allow you to generate new embed codes. If you don't have admin rights, you can't do anything else except asking for permission.
See: Heads up: The Publish to web default is changing and it affects who can create public embed codes