2D Dungeon generator logic?

Im in need of making a 2D dungeon generator. Since i have no logic on it, i would like to know how would i make a 2D dungeon generator?

You should first learn about instantiating game objects.

Instanciate (gameobject, position, quaternian Identity);

Another good thing to learn is raycasting to see what game object is either next to another object or not so you can instance a wall or something.
Once you understand that you will just need to randomly place gameobjects.

Random.Range(1,100); 

But if you don’t know any of these I would first learn the basics.

TileMap

Maze generator