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

#### Freehand Drawing

draw 17 edit 13 freehand 3 vector 86

#####

Geometry type
Freehand Activated

Example using the ol/interaction/Draw interaction in freehand mode.

This example demonstrates the `ol/interaction/Draw` in freehand mode. During freehand drawing, points are added while dragging. Set `freehand: true` to enable freehand mode. Note that freehand mode can be conditionally enabled by using the `freehandCondition` option. For example to toggle freehand mode with the `Shift` key, use `freehandCondition: shiftKeyOnly`.

##### main.js

    import Map from 'ol/Map.js';
    import View from 'ol/View.js';
    import Draw from 'ol/interaction/Draw.js';
    import TileLayer from 'ol/layer/Tile.js';
    import VectorLayer from 'ol/layer/Vector.js';
    import OSM from 'ol/source/OSM.js';
    import VectorSource from 'ol/source/Vector.js';

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

    const source = new VectorSource({wrapX: false});

    const vector = new VectorLayer({
      source: source,
    });

    const map = new Map({
      layers: [raster, vector],
      target: 'map',
      view: new View({
        center: [-11000000, 4600000],
        zoom: 4,
      }),
    });

    const typeSelect = document.getElementById('type');

    const freehandCheckbox = document.getElementById('freehand');

    let draw; // global so we can remove it later
    function addInteraction() {
      if (typeSelect.value !== 'None') {
        draw = new Draw({
          source: source,
          type: typeSelect.value,
          freehand: freehandCheckbox.checked,
        });
        map.addInteraction(draw);
      }
    }

    /**
     * Handle change event.
     */
    typeSelect.onchange = function () {
      map.removeInteraction(draw);
      addInteraction();
    };

    /**
     * Handle change event.
     */
    freehandCheckbox.onchange = function () {
      if (draw) {
        draw.setFreehand(freehandCheckbox.checked);
      }
    };

    addInteraction();

##### index.html

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="UTF-8">
        <title>Freehand Drawing</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>
        <form>
          <label for="type">Geometry type &nbsp;</label>
          <select id="type">
            <option value="LineString">LineString</option>
            <option value="Polygon">Polygon</option>
            <option value="Circle">Circle</option>
            <option value="None">None</option>
          </select>
          <label for="freehand">Freehand Activated</label>
          <input type="checkbox" id="freehand" checked />
        </form>

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

##### package.json

    {
      "name": "draw-freehand",
      "dependencies": {
        "ol": "10.9.0"
      },
      "devDependencies": {
        "vite": "^3.2.3"
      },
      "scripts": {
        "start": "vite",
        "build": "vite build"
      }
    }