Understanding in what sense does the 'equals to' sign indicate equality in different scenarios. I recently came to the realization that I've been taking the equals to sign for granted in mathematics and all of science. So I started to study about it in detail, and came to the understanding that -
The equals to sign indicates equality, i.e. same-ness between two things in some specific sense. So if we're using an equals to sign (=) somewhere we need to first look for what two things are being compared for equality and second in what sense the equality exists between them.
For example, consider the two things below. We can say that they are equal, or the same, in the sense of their purpose - storing liquids for later use. However, they're not equal in the sense of their lengths, or widths for example.
I introduce an equals to sign between these things and this equals to sign indicates equality only in the sense of their purpose.

Different types of equations exist in mathematics and in a quest to understand the notion of equality I've been trying to figure out in what sense the two things that these equalities compare are equal.
1. Equations involving only numbers:
$$8=8$$
In what sense $8$ and $8$ are equal?
2. Equations involving numbers and arithmetic operations:
$$2+6=8$$
In what sense $2+6$ and $8$ are equal?
3. Equations involving numbers and expressions:
$$4x+5=16$$
In what sense $4x+5$ and $16$ are equal?
4. Equations involving only expressions:
$$4x+5=9-7x$$
In what sense $4x+5$ and $9-7x$ are equal?
5. Equations involving denotations
$$A=[2 \quad 3 \quad 4]$$
In what sense $A$ and $[2\quad3\quad4]$ are equal?
 A: In most situations, saying $\text{Thing A} = \text{Thing B}$ means that you are saying that Thing A and Thing B are the same object. They might be expressed differently on each side of the equation, but the two expressions denote the same object. They will have all the same properties, substitute them into any (appropriate) function, and you'll get the same result, etc, etc. They are the same.
Note that saying $\text{Thing A} = \text{Thing B}$ does not automatically make what you wrote true. I could write, for example $3 = 5$, which, syntactically, is a perfectly sensible statement, but one that is plainly false.
Equalities like this are propositions: a statement that can be true or can be false. You can claim or insist a proposition is true (or false), or investigate when a proposition is true if it depends on some unknown (these "propositions" with unknowns are more correctly known as "predicates").
Your examples 1 and 2 are just plain statements (true ones, at that). The statements $8 = 8$ and $2 + 6 = 8$ hold because the two expressions on each side of the $=$ are the same.
Your examples 3 and 4 are predicates. As long as we understand from context that $x$ is a real number, they are cogent statements with a true/false value that depends on the unknown quantity $x$. They are true for some $x$, and false for others.
For example, when $x = 0$, $4x + 5 = 16$ is false, because the left hand side refers to the number $5$, and the right hand side refers to the number $16$, which are different numbers. Instead, if we consider the case $x = \frac{11}{4}$, then both sides become the number $16$, and thus the statement is true.
It's worth noting that predicates are not really required to be true sometimes or false sometimes. It would be a perfectly fine predicate to write $x^2 + 1 = 0$, where $x$ is understood to be a real number. This predicate is false, regardless of the value of $x \in \Bbb{R}$.
Your example 5 is something different. Denotations/definitions/assignment are not a true-false statements. Instead, you are creating a new symbol, as a notational shortcut. Considering $A = \begin{bmatrix} 2 & 3 & 4 \end{bmatrix}$ as a true/false statement doesn't make much sense, because you don't have any prior knowledge of this $A$ symbol. At best, you could generously interpret it as a predicate, but this would be entirely contrary to the intent of the author. That said, after this definition has been made, one can write $A = \begin{bmatrix} 2 & 3 & 4 \end{bmatrix}$ as a true/false statement, and it will be true!
The use of $=$ in this situation is potentially confusing. For this reason, some authors prefer to have a different symbol for definitions, usually $:=$, or sometimes $\overset{\small{\Delta}}{=}$. This distinguishes them as definitions, rather than true/false statements. Of course, the $=$ symbol is still in the mix, given we are forcing equality, i.e. the new symbol to mean the same thing as the right hand side.
There are other confusing edge cases you haven't touched on either. Some people will write
$$\sin^2 x + \cos^2 x = 1,$$
and intend it not so much as a predicate, but as an identity (which is to say, a predicate involving $=$ which is always true). This is an abuse of notation somewhat, as it should involve a quantifier, specifically
$$\forall x \in \Bbb{R}, \sin^2 x + \cos^2 x = 1.$$
This is now a true statement, and not a predicate. Some will instead denote
$$\sin^2 x + \cos^2 x \equiv 1,$$
using a special equality symbol to indicate the equation is supposed to be an identity.
Another example that's even more abusive to notation involves modular arithmetic. It's not uncommon to write, say, $3 = 25 \mod{11}$. This is different again; the number $3$ is not the same as $25$, or "$25 \mod{11}$" (whatever you take that to mean). It's equally correct to write $14 = 25 \mod{11}$, but the number $3$ is not the same as the number $14$.
What they mean is, $3$ and $25$ both belong to the same modulo class, i.e. a set of numbers all with the same remainder when divided by $11$:
$$\{\ldots, -19, -8, 3, 14, 25, 36, \ldots\}.$$
This is not the same as saying they're the same object! It can be fixed by replacing $3$ and $25$ with their modulo $11$ equivalence classes, but this is not what is literally written down. So, beware: abuses of notation also exist (and, if you haven't seen it, wait until you see big O and little o notation!).
