The general thought on this you might think would be that more is better, is as a general rule this is mostly true. However, when you’re in a tight anchorage the rules tend to change and several things come into play.
First, you have to, of course, consider your depth and the expected winds. You have to have enough scope (length of chain/rode) to be able to ride out whatever winds blow up at your anchorage. A good start would be to expect to pay out at least 5:1 scope if you expect winds to pick up. If you’re anchored in 20 feet of water,
There are so many things to consider along with the above. The size of your chain, the size of your anchor and the type, the bottom of the anchorage (sand, mud, rock), and also pay attention to the tides. If you are anchored in 20 feet and expecting a blow, make sure that if the tide rises six feet or so you have enough chain payed out to handle the rise.
Lastly, and this is something that came into play during our last sail to the island, understand that in a blow the chain will be at least partially pulled up from the bottom and your swing will increase. Make sure that you have enough room to safely swing around the anchorage without running into other boats! Then if the tide goes out and you are in a tight anchorage, understand that your scope will increase and you may also swing more.
These are mostly thoughts from years of experience