The 2022 version of the For the Strength of Youth pamphlet explains that making good choices improves your ability to feel the spirit.
For the Strength of Youth: A Guide to Making Choices (Salt Lake City, UT: The Church of Jesus Christ of Latter-day Saints, 2022), 16
Making good choices improves your ability to feel the Spirit. There are many good and wholesome things in this world. Just as your body is affected by what you eat and drink, your mind and spirit are profoundly affected by what you read, watch, and listen to.