There are examples in the open layers documentation: https://openlayers.org/en/latest/examples/bing-maps.html
Here are some additional resources:
https://openlayersbook.github.io/ch04-interacting-with-raster-data-source/example-04.html
https://riptutorial.com/openlayers-3/example/20935/example-using-bing-maps