Hi,
There isn't an "official" way to create tilemaps at runtime, as a lot of the code is simply stored in editor code to reduce runtime bloat. Easy option - create a HUGE tilemap (max size is fine), but keep it empty. Then you can tweak as necessary at runtime - empty tilemaps don't really take up that much memory (close to negligible).
Or do the above, create a prefab and instantiate at runtime. The tilemap requires the data / editor data objects, which are a pain to generate at runtime.