Well, there are a number of factors that you should consider before buying the stocks. The stock prices can often fool people into thinking that it can lead them to unlimited amount of profits. However, this is not necessarily true.
Suppose that a company carries a market cap of $100 billion with 10 billion shares whereas another company caries a market cap of $1 billion with 100 million shares, both of these companies will be carrying $10 in share price. However, the first company would be 100 times more in worth than the second company. Hence, buying stocks based on the quoted values is not always advised whether it is Apple or another company such as Google.