This is just a little thing I’ve done a couple of times, and it worked nicely. Many witches collect dirt or detritus from important locations (graveyards, courthouses, colleges, etc…) for use in spellwork. I find it works great.
The problem, of course, is that you often get weird looks and could run into trouble while doing it! First of all, only do it in areas you’re allowed to be - don’t trespass, obviously!
The thing is, though you’re not trespassing, some onlookers might still cause trouble for you, especially if you’re in a very conservative/uptight area of the world.
My method for handling this is simple. I carry a small clipboard. This serves two purposes: I can write where and when I got the material using the clipboard, and people (seeing the clipboard) assume I’m a student doing a project, so they don’t bother me or think it’s odd!
Thus far, while doing this, nobody’s really approached or noticed me much. It’s great! Letting someone assume I’m doing something else feels okay to me. There’s obviously a ton of other things (magical and mundane) that you’ve got to consider and think about when collecting soil, but this makes it easier.
Another thing I’ve done: instead of collecting soil, collect leaves! This works best in autumn, and you’ll want to consider what species of leaves you’re getting.
Nevertheless, some dried leaves from a place are just as tied to the land as the soil itself, in my opinion. If, while doing that, someone approaches you, you can just say, “I’m building a leaf collection!” It’s true, after all!