What a hash is for
A hash is a fixed length fingerprint of data. If a single byte changes, the hash changes completely. That makes hashes useful to check that a file arrived intact.
Not for storing passwords
MD5 and SHA-1 are broken for security use, and even SHA-256 alone is far too fast for storing passwords. Systems that store passwords should use a slow, salted function such as Argon2id, scrypt or bcrypt.
A website never needs you to hash your own password. If someone asks you to, it is a scam.
Text encoding
Text is encoded as UTF-8 before hashing, which is what most tools and programming languages do. Line breaks count, so a trailing new line changes the result.