This example uses OpenLayers v10.9.0. The latest is v.
Edit

#### STAC support

stac 2 geotiff 5 cog 15 layergroup 2

#####

Rendering a STAC Item with geometry and COG.

This example uses the npm package `ol-stac` which adds STAC support to OpenLayers. It can for example show geometries and assets from SpatioTemporal Asset Catalog (STAC) Items as a layer group. For more examples visit https://moregeo-it.github.io/ol-stac/en/latest/examples/.

##### main.js

    import STAC from 'ol-stac';
    import Map from 'ol/Map.js';
    import View from 'ol/View.js';
    import TileLayer from 'ol/layer/WebGLTile.js';
    import {register} from 'ol/proj/proj4.js';
    import OSM from 'ol/source/OSM.js';
    import proj4 from 'proj4';

    register(proj4); // required to support source reprojection

    const layer = new STAC({
      url: 'https://s3.us-west-2.amazonaws.com/sentinel-cogs/sentinel-s2-l2a-cogs/10/T/ES/2022/7/S2A_10TES_20220726_0_L2A/S2A_10TES_20220726_0_L2A.json',
    });

    const background = new TileLayer({
      source: new OSM(),
    });

    const map = new Map({
      target: 'map',
      layers: [background, layer],
      view: new View({
        center: [0, 0],
        zoom: 0,
      }),
    });

    layer.on('sourceready', () => {
      const view = map.getView();
      view.fit(layer.getExtent());
    });

##### index.html

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="UTF-8">
        <title>STAC support</title>
        <link rel="stylesheet" href="node_modules/ol/ol.css">
        <style>
          .map {
            width: 100%;
            height: 400px;
          }
        </style>
      </head>
      <body>
        <div id="map" class="map"></div>

        <script type="module" src="main.js"></script>
      </body>
    </html>

##### package.json

    {
      "name": "stac-item",
      "dependencies": {
        "ol": "10.9.0",
        "ol-stac": "^1.2.0",
        "proj4": "2.20.8"
      },
      "devDependencies": {
        "vite": "^3.2.3"
      },
      "scripts": {
        "start": "vite",
        "build": "vite build"
      }
    }