Correct, although we say hash functions produce "unique" outputs that will, no matter how hard you try, never be replicable with different inputs, it is theoretically possible to create a hash-collision, where two different inputs give a single matching output. For example string:
d131dd02c5e6eec4 693d9a0698aff95c 2fcab58712467eab 4004583eb8fb7f89
55ad340609f4b302 83e488832571415a 085125e8f7cdc99f d91dbdf280373c5b
d8823e3156348f5b ae6dacd436c919c6 dd53e2b487da03fd 02396306d248cda0
e99f33420f577ee8 ce54b67080a80d1e c69821bcb6a88393 96f9652b6ff72a70
d131dd02c5e6eec4 693d9a0698aff95c 2fcab50712467eab 4004583eb8fb7f89
55ad340609f4b302 83e4888325f1415a 085125e8f7cdc99f d91dbd7280373c5b
d8823e3156348f5b ae6dacd436c919c6 dd53e23487da03fd 02396306d248cda0
e99f33420f577ee8 ce54b67080280d1e c69821bcb6a88393 96f965ab6ff72a70
will produce an identical MD5 hash even though there are several digits that are different. This is particularly significant due to the use of MD5 for verifying data-integrity, for both intentional and unintentional corruption since it's common that a few bits of data may have been corrupted.
When MD5 was first published in 1992, it was considered to produce "unique" outputs, but in that time, computers had significantly less processing power and it was extremely inefficient to search for MD5 hash-collisions. In 2018, it's now possible to find an MD5 collision within seconds.
In terms of SHA-256 and the rest of the SHA-2 family, they're are currently no known collisions, (however there are some for SHA1, more information here: https://shattered.it/) but since SHA hashes all have a limited output length, (256 bits, 512 bits) the Pigeonhole Principle (https://en.wikipedia.org/wiki/Pigeonhole_principle) states that if the input is greater than that of the predefined output length, for example a 300 bit input hashed using SHA-256, there must be another input that is 256 bits or less that gives the same output as the hash of the 300 bit string. No matter how hard you try, you won't be able fit more data into your hash than your hash will spit out.
Back to your original question, since almost all hash algorithms produce hashes of predefined lengths, independent of input size, there will always be the possibility of having two different inputs having the same hash as long as your hash function permits inputs of any size (which is true for almost all hash functions).
For the impatient, the answer to
I'm curious, how can for example SHA-256 be unique if there are only a
limited number of them?!
Is: They can't. There are a limited number of outputs and the rules of math say that we can't fit more data into a smaller space without overlapping (aka a hash collision). Any 'fixed output size' hash is not unique by math, but rather by our ability to compute things. A sort of 'pseudo-unique', if you will, just like 'pseudo-random'. And we only say hash functions produce unique outputs because we aren't powerful enough to find two identical hashes of different strings. Just like how we call fingerprints unique. It may be theoretically possible for two people to have identical fingerprints, but it's very hard to find.
Then what's the solution to this?
For now, we should be totally fine using current hash algorithms, but in theory, if there actually is a problem of hashes not being 'unique' enough, we could turn to hash algorithms that produce infinitely long outputs (or outputs that were of variable size). As far as I know, none of these exist, but I'm sure it is possible to do. And if we always make our hashes longer than our data, we're theoretically guaranteed to have a hash function that produces truly unique outputs every time.
So that's just my two bits on that. There are much bigger problems in cryptography than this, but it's something worth talking about. Cheers!