The length of your credit history is determined by when you opened your first line of credit.
A lot of components go into building a positive credit history and credit score including the current age of your credit history. Your current credit scoring model, such as FICO, may determine your credit score by calculating the average length of time that your current accounts have been open or the age of your oldest account. For example, if you recently opened your first credit card, then you may see your credit score be relatively low (even if you opened it 3-4 years ago). You can help your credit history have a positive impact on your score by avoiding opening up new cards and lines of credit. An insufficient credit history may have a small effect on your score, but that can be offset by other factors, such as timely payments on certain debt and credit accounts and low balances.