Before we get into the spell list for The Ranger, lets begin with a brief refresher on what it means to cast spells as a Ranger, as well as how to prepare and cast spells as a Ranger:
By the time you reach 2nd level, you have learned to use the magical essence of nature to cast spells, much as a druid does.
Rangers do not normally gain the ability to cast cantrips when they gain their ability to cast spells at second level. However, if you choose the Druidic Warrior Fighting Style at 2nd-Level, you gain the ability to do so.
This Fighting Style allows you to learn two cantrips of your choice from the Druid Spell List. They count as Ranger spells for you, and Wisdom is your spellcasting ability for them. Whenever you gain a level in this class, you can replace one of these cantrips with another cantrip from the Druid Spell List.
The Ranger table shows how many spell slots you have to cast your ranger spells of 1st level and higher. To cast one of these spells, you must expend a slot of the spell's level or higher. You regain all expended spell slots when you finish a Long Rest.
For example, if you know the 1st-level spell Animal Friendship and have a 1st-level and a 2nd-level spell slot available, you can cast Animal Friendship using either slot.
You know two 1st-level spells of your choice from the ranger spell list.
The Spells Known column of The Ranger table shows when you learn more Ranger spells of your choice. Each of these spells must be of a level for which you have spell slots. For instance, when you reach 5th level in this class, you can learn one new spell of 1st or 2nd level.
Additionally, when you gain a level in this class, you can choose one of the Ranger spells you know and replace it with another spell from the Ranger spell list, which also must be of a level for which you have spell slots.
Wisdom is your spellcasting ability for your Ranger spells, since your magic draws on your attunement to nature. You use your Wisdom whenever a spell refers to your spellcasting ability. In addition, you use your Wisdom modifier when setting the saving throw DC for a ranger spell you cast and when making an attack roll with one.
Spell save DC = 8 + your proficiency bonus + your Wisdom modifier
Spell attack modifier = your proficiency bonus + your Wisdom modifier
2nd-level ranger optional feature
At 2nd level, you can use a Druidic Focus as a spellcasting focus for your Ranger spells. A Druidic Focus might be a sprig of mistletoe or holly, a wand or rod made of yew or another special wood, a staff drawn whole from a living tree, or an object incorporating feathers, fur, bones, and teeth from sacred animals.