Most vehicles have some flat steel surface on the roof. It doesn’t take much - it just needs a couple of square inches. It has to be ferrous (steel or iron, not aluminum) to be magnetic. If you don’t have a surface, just take a small piece of sheet steel and glue it to the roof.
You can glue the antenna itself to the roof, but one of the advantages to a magnetic mount antenna is that, if it hits a branch it just slides right off the roof unharmed instead of breaking.