Just like finding the right home when you buy your real estate, the most important thing is location, location, and location. Let’s look at Jamestown in Virginia for this case. Spain and France was a rival for the English while they decide on the location to start a long-term settlement. Spain established a settlement some 40 years earlier in St. Augustine in Florida. Developed to be a fort, it is meant to protect Spanish traders from pirates and also to start Catholic missionaries. So now, why Virginia? Why start at Jamestown? The English spent two weeks to explore the James River where their settlements would end up being a peninsula, with a narrow link to the mainland 50 miles up the James River, up the mouth of Chesapeake Bay ends up being the final location.
Safety was prioritized rather than ease of trading. 50 years earlier, Spain destroyed the fort the French has along the coastline so the English that building theirs further inland is a better decision. With the safety of being far from the coast, being less exposed that other choices they have, the realism of fear from pirates, the Dutch, other British and the Spain leads them to settle for Jamestown. The peninsula they opt to build on also works as an isolated island that makes walling off against attacks from the native Americans easier. The island too is far enough inland they were there to be any attack from any invaders from the sea, they would get spotted and the English would have more than enough time to prepare for the attacks while the invaders attempt to awkwardly sail up a narrow river.
So why not further inland? Other than there not having any suitable “island” to start the settlement on, the further up the river, the shallower the river gets for bigger trade ship. Jamestown is in that perfect location where it is not too far from the ocean and not too close to the ocean. Although they have the right location, they did not count for one thing that eventually lead to its downfall. The island is too small to be self-sufficient so starving was prominent and the area is not in fact defensible against any invaders that could manoeuvre upstream.