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

#### Stadia Maps (Stamen Tile Layer Composition)

stamen 1 watercolor 1 terrain-labels 1 two-layers 1 stadia-maps 2

#####

Example of composing layers with a Stadia Maps tile source.

Two layer groups are composed: the watercolor base layer with the terrain labels from Stamen.

##### main.js

    import Map from 'ol/Map.js';
    import View from 'ol/View.js';
    import TileLayer from 'ol/layer/Tile.js';
    import {fromLonLat} from 'ol/proj.js';
    import StadiaMaps from 'ol/source/StadiaMaps.js';

    const map = new Map({
      layers: [
        // NOTE: Layers from Stadia Maps do not require an API key for localhost development or most production
        // web deployments. See https://docs.stadiamaps.com/authentication/ for details.
        new TileLayer({
          source: new StadiaMaps({
            layer: 'stamen_watercolor',
            // apiKey: 'OPTIONAL'
          }),
        }),
        new TileLayer({
          source: new StadiaMaps({
            layer: 'stamen_terrain_labels',
            // apiKey: 'OPTIONAL'
          }),
        }),
      ],
      target: 'map',
      view: new View({
        center: fromLonLat([-122.416667, 37.783333]),
        zoom: 12,
      }),
    });

##### index.html

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="UTF-8">
        <title>Stadia Maps (Stamen Tile Layer Composition)</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": "stamen",
      "dependencies": {
        "ol": "10.9.0"
      },
      "devDependencies": {
        "vite": "^3.2.3"
      },
      "scripts": {
        "start": "vite",
        "build": "vite build"
      }
    }