[RPG] How does one find new spells

dnd-5espells

I am creating a Warlock with the pact of the tome and reading the Book of Ancient Secrets invocation I got a little lost. It says:

On your adventures, you can add other ritual spells to your Book of Shadows. When you find such a spell, you can add it to the book if the spell’s level is equal to or less than half your warlock level (rounded up) and if you can spare the time to transcribe the spell. For each level of the spell, the transcription process takes 2 hours and costs 50 gp for the rare inks needed to inscribe it.

I am new to D&D so the concept of finding a new spell isn't very clear to me. Can someone please explain how could I learn new rituals with my warlock?

Best Answer

You find them as treasure!

Everyone likes gold and magical treasures, but a warlock or wizard prizes the treasure of knowledge above all. Ancient tomes of incantations, a scrap of lost research, a scroll encoding a single forgotten magical effect, a spell carved in ten-foot-high letters into solid rock in the fabled city of the Magus Confederation—these are treasure worth more than gold, because lost bits of knowledge cannot be bought at any price.

You can also get new-to-you spells from friendly spellcasters for barter or gold, or seize them from the bloodied books of defeated enemy spellcasters. These are equally treasure, though you might go about getting them differently than how you seek ancient spellcasting knowledge.