When building AI models, how do developers make sure that user data stays private and that the model follows data protection laws (like GDPR in Europe)?

How can AI developers keep user data safe and make sure their models don’t give wrong or unfair answers?