Sure you can. You just need enough land and money to start basic things like a post office, city hall, courthouse, roads, and a way to get power to the whole thing.
Starbase TX isn't a city in any sense other than a legal designation. It's a massive SpaceX industrial facility that has its own municipality similar to the way Disney World has one for its park.
I would expect the adjacent area to become some sort of a city over time. Suppliers will move nearby. Population, amenities and competition will follow. Unless of course SpaceX keels over before all this can happen.