Anyone who wants to learn how to do magick would be wise to start with protection magick. It’s not because magick is inherently dangerous (although depending what you get into it can be) but because you can learn the basics while also building skills that will help keep you out of any potential trouble.
Many books on ceremonial magick start practitioners out with a basic ritual called the Lesser Banishing Ritual of the Pentagram. It involves drawing magical energy into yourself and then using it to establish a boundary around you. In witchcraft and Wicca its equivalent is casting a circle. Even if you choose to not use it regularly in your later practice it’s an excellent foundational ritual to know.
General books on how to do magick usually include some basics about protection; here are some of the better ones. There are a number of good books available specifically about protection magick. Here are some I can recommend.
“Psychic Self Defense” by Dion Fortune is a classic that is still frequently recommended.
“Psychic Shield” by Caitlin Matthews.
“Protection & Reversal Magick” by Jason Miller.
“Protection Spells” by Arin Murphy-Hiscock.
“The Witch’s Shield” by Christopher Penczak.
“Protection Magic: Spells for Defense” by Cassandra Eason.
“Practical Protection Magick” by Ellen Dugan.
“Traditional Magic Spells for Protection and Healing” by Claude Lecouteux.
“Spiritual Cleansing” by Draja Mickaharic.
“Hoodoo Cleansing and Protection Magic” by Miss Aida.
“By Rust of Nail & Prick of Thorn: The Theory & Practice of Effective Home Warding” by Althaea Sebastiani.
“Hindu Protection Magic” by Ajit Kumar.
“Defense Sigils Made Easy” by Art Russell Clovis.