While data security protects data from external threats and malicious actors, data privacy deals with how individuals or companies collect, share, and use their information.