To find the Demon King, you must fall into the chasm beneath Hyrule Castle.
Before you go, cook Sundelions and use Sundelions in recipes to create foods that restore hearts lost to gloom, and cook some foods that restore hearts.
Make sure to purchase arrows if you need them. You can also attach weapons and devices to Mineru's Construct's hands and back.
Explore Hyrule Castle Chasm
There is a shrine, Serutabomac Shrine, at Hyrule Castle. It is in the northeast part of the castle. Go there, then dive into the chasm beneath the castle while staying near the shrine. This way, you can land near Camobatures Lightroot, which is directly beneath the shrine. Activate it.
Go down into the hole south of the Lightroot. Then continue going south and you will see a Shock Like on the wall. Defeat it, then look down and you will see more Shock Likes. Defeat them and go down below where they were.
There are Horriblins in this area. Defeat them, then climb up the south wall and go into the tunnel there. Electric Keese will attack.
Go south and there is a Lynel down below. Defeat it. You can then go east and use Ascend to reach the stone platform. The bridge ahead will fall beneath you, but you can follow the tunnel to an area to the east with large chunks of rubble that fall from above. You can stand on the rubble and use Recall on it to go up above, then go south, then west. Break through the walls of boulders to reach an area that overlooks where you fought the Lynel. Go south.
Defeat the Ice Likes and Ice Keese up ahead.
Go south, but beware of the stone in the ledge that will fall when you step on it. There are Lizalfos in the room up ahead. Defeat them if you wish, then dive down the middle of the room. You will see a message that the power of a sage cannot reach you.
Defeat the Lizalfos here, then approach the north door to make two Chuchus come out. Defeat them, then go to the side room where there are Zonai devices. Attach the Wing to the cart, then attach a steering stick on top, and attach a fan and rocket to the back. Place the wing so that it is not too close to the edge (which will fall), and make sure it is pointing to the north, where there is a Moblin. Fly the wing to the far side to avoid the gloom monsters in the pit below. Defeat the Moblin.
Up ahead, there is a large wall of boulders. These boulders hide a tunnel, but the tunnel just leads back to the room where you fought the moblin, so instead of going down that tunnel, go west down the slope. This leads you to the Forgotten Foundation.
Defeat the Bokoblin ahead, then the Gibdos. At the end of the hall, break the boulders and go through the door.
You will find the murals that you found at the beginning of the game. Break the boulders against the east wall to find the door.
Follow the path down and you will find the Imprisoning Chamber. Dive into the hole and you will reach Gloom's Lair.
Go south and you will find a platform with a circle on the end. Stand on the circle and press the button to jump.
When you land, there will be a cutscene, and you must battle the Demon King's Army.
Demon King's Army
Defeat the Bokoblins and Boss Bokoblins. After they are gone, Lizalfos will attack. After that, there will be Gibdos. This is followed by Moblins. Attach Muddle Buds to arrows to make the monsters fight each other.
If you did not complete the dungeons prior to this, you will have to battle the dungeon bosses that you didn't fight before:
After the Boss Rush
After that, there will be a cutscene.
Go north and there will be another cutscene. Then you will battle Demon King Ganondorf.