I would strongly suggest using FEniCSx if you are new to FEniCS, as it is the recommended tool: The new DOLFINx solver is now recommended over DOLFIN
There we have demos illustrating this:
https://jsdokken.com/dolfinx-tutorial/chapter3/subdomains.html#subdomains-defined-from-external-mesh-data