MD5 was designed for speed decades ago and is now broken for collision resistance: researchers can craft two different inputs that produce the same digest. That breaks digital signatures, certificates, and any scheme relying on unique fingerprints. By contrast, SHA-256 remains collision-resistant and widely trusted in modern systems.
If you only need a quick checksum in non-adversarial contexts, you might see legacy MD5 usage. However, for security-sensitive integrity use cases, prefer SHA-256 or add a keyed MAC like HMAC-SHA256. For passwords, use a KDF such as PBKDF2 rather than plain hashes.
Try: SHA-256, HMAC-SHA256, PBKDF2