...
Because of the uniqueness of our hash function output, we can use it as a digital signature.
a minor comment on signatures: there might be use cases where you can use a sha256 fingerprint as a digital signature, cause everytime you provide the same input, it returns the exactly same output.
Generally speaking in crypto world, digital signatures are based on a different logic, and in bitcoin world the ECDSA logic is used.
I would like to say, that for digital signatures the common software is [EC]DSA logic, and sha256 (or other hashing) is seldom used for signatures. Next to the (H)MAC functions (as described above by bob123), the main benefit and use case of sha256 (and other hashing software) is, that you can say, if content of a file/data has been changed. E.g. you transfer data from system A to B. And also you provide the short checksum. Then B can run the sha256 also on the file, once received, and must receive the exactly same hash value. Otherwise file has changed. Same is true for files on your hard drive: you can check them once, store it in a reference file, and run every day/week/month a sha256 again, compare results against the reference file, and see if contents of (important) files has changed -> this allows to detect malicious code/software on a system.