Heading up towards Stormveil Castle after defeating Margit the Fell Omen, you'll be faced with a choice of paths. Heading to the main entrance, you'll be faced with ballista ambushes and several enemies.
Making your way past those will take you to the optional Lion Guardian boss in Elden Ring. The NPC at the Site of Lost Grace will warn you against this, telling you that death awaits.
However, if you're adamant, here's how you can defeat it.
Preparation
Try to save Flasks for the Lion Guardian itself, rather than the enemies you'll meet as part of the ballista ambushes. Using up too many resources beforehand could leave you very, very short when it matters.
Using your summon on these soldiers, however, could prove to be astute for precisely that reason. They're not particularly useful against the Lion Guardian itself, apart from perhaps the tanking ability of the Northern Mercenary Ashes, so use it on the mobs to clear a path more quickly.
You can try to sneak towards the Lion Guardian from behind, allowing for a few meaty hits before the real fight begins.
Combat
The Lion Guardian Lion is pretty mobile for a boss, making him unpredictable and difficult to hit. He can leap towards you to attack, with a longer jump forming part of a counter-attack.
Ranged attacks or spells can work well here, and you should use obstacles such as pillars and trees to your advantahe in creating space between you and the Lion. This should buy you time to heal and gather your wits.
This boss often attacks in two stages. The first is directly, followed by a rising blow when leaping or rotating. Bear this in mind when dodging or blocking with a shield -- you will need to try and bait out these attacks, as you can't block them all.
Rewards
You'll earn nothing for this victory, other than Runes and being able to progress further.
If you haven't already, you can take the other passage and face the Many Armed Key Master.