From my personal experience, 15-20 feet is ideal. Early season like now I will set up on well used trails that are entering the food sources. I like to use an attractant (like some type of mineral lick) to get the buck to stop and pose for the picture (make sure his is legal in your state). Try not to set up your camera where the sun will rise and set. Angle your camera so the deer are quarting towards your camera. They will be in the frame longer and you’ll have a better chance of capturing the entire deer versus just a part of the deer. I also like setting up my camera on water sources as well. Again, you want the deer to be stationary and not walking through.
Later in the season, I move my cameras to scrapes and rubs along field edges. I will even make mock scrapes (I use no scents) and fasten a leafy oak branch to a tree for a licking branch and paw in the scrape with a stick. I’ve had pretty good success in doing this.