How to create a map showing different boundaries to OSM's admin_level=2 ones?

Yes, that could work for my map.

(I’ve moved this to a new thread)

First question, what sort of map? I presume that you’re looking for a web-based map that you can move around, like the ones on osm.org.

Broadly speaking, there is a choice of two types: vector based ones (like the Shortbread and Maptiler ones on osm.org) and raster ones (like the “standard” map). Of the two, vector ones are easier to create. Which would you like?

That’s the one I’m using.

The main issue is that I only want to show the western Sahara border, not all admin level 2.

Also as disputed one.

The rendering will be MapLibre.

As a quick example, I’ve used osmium to merge together Algeria, Mauritania and Morocco, and then used osm-tags-transform to make the changes to the data, as follows:

-- Morocco including the occupied part of Western Sahara
    if ( object.tags["wikidata"] == "Q1028" ) then
        object.tags["admin_level"] = nil
    end

-- Morocco excluding the occupied part of Western Sahara
    if ( object.tags["name"] == "Morocco except Western Sahara" ) then
        object.tags["admin_level"] = "2"
        object.tags["boundary"]    = "administrative"
    end

-- Western Sahara itself
    if ( object.tags["wikidata"] == "Q6250" ) then
        object.tags["admin_level"] = "2"  
    end

-- SADR territory
    if ( object.tags["wikidata"] == "Q40362" ) then
        object.tags["admin_level"] = nil
    end

Before, a Shortbread map (based on OSMF vector tiles) looks like this:

and after (a map I created myself with Tilemaker and the shortbread-tilemaker reference code), like this:

I used the Shortbread vector tile schema and my SVWD03 style simply because I had the code for both to hand. The changes are made to the OSM data file before creating any map tiles, so the principle would work just as well with OpenMapTiles, or OSM Carto, or any other style that renders boundaries from OSM boundary relations and admin_level tags.