Growing receptacles

Can I use 5 gallon buckets to grow my tomatoes and peppers (like the orange ones from Home Depot)? It seems cheaper than buying pots.

Is there an issue I’m not seeing?

Disclaimer: I don’t know what I’m doing but my tomato plants are about two inches tall already!

Edit bc I don’t want to make another post: I have a very large squirrel population (and a few raccoons) quite literally in my yard where my garden will be. Should I construct covers for my raised beds so they can’t get in? Any suggestions are appreciated!