Masks are "written" on the silicon in layers and then etched out, most IC manufacturing processes use multi-patterning which means that multiple masks are printed on the silicon, exposed and then etched out.
The longer it takes to make an IC the lower the yields which bring up costs considerably.
Edit: well I was partially incorrect Photomasks are still used maskless manufacturing aka MAGIC isn’t there yet a combination of hard masks which are printed on the silicon and Photomasks are used to create the pattern.
Intel currently uses quadruple patterning so 4 masks in total are needed to create the final pattern.
There is a bit more complexity for 2.5 designs such as wall masking but this is beyond me.