Beta = systematic risk
Standard deviation = total risk
There are two types of risk, systematic and unsystematic risk. Systematic risk affects the entire stock market. The recession of '08 is a good example of systematic risk. It affected all stocks. On the other hand, unsystematic risk is risk that only affects a particular security. For example, the risk of Tesla declaring bankruptcy is an unsystematic risk. It does not affect the entire market.
Unsystematic risk can be eliminated with a well-diversified portfolio (see Modern Portfolio Theory for more information on that). But basically, by holding enough uncorrelated securities, unsystematic risk can be eliminated. However, if investors were compensated for taking risk that can be eliminated, the return of unsystematic risk would be arbitraged to zero. Therefore, investors are only compensated for systematic risk.
This is where beta and standard deviation come in. Standard deviation represents total risk, the sum of systematic and unsystematic risk (i.e., the sum of variances). Beta measures systematic risk only, which is what return should be based on in an efficient market. Assuming you have a well-diversified portfolio, you are more focused on the systematic risk of a security because that is what returns are based on. Therefore, you look at beta to measure risk/return. However, if you have no portfolio to start with, unsystematic risk is more relevant to you. In this case, standard deviation is your friend because it accounts for both risk types.