It does play a role and it will generally determine on your ranking. For instance older domains will rank higher compared to another site with similar content and keywords. However, this is not always true because some newer sites can even rank higher if they apply the right
SEO methods.