I am a bit confused by different definitions of the standard error term in statistics that I find. For simplicity I will only refer to the standard error of mean. In one place I find that it's defined as the standard deviation of sample means and in other places I find it defined as $SE = \frac{\sigma}{n}$ where $n$ is the sample size. This also creates some ambiguity for me already because what is that $n$ in that formula? If we have multiple samples with different sample sizes, which size do we use?
I understand the algebra behind the proof of the derivation of the formula but I am confused in practice what would happen if there are multiple samples (of maybe even varying sample sizes).
As an example, let's say we have a population of $\{1,2,3,4,5,6,7\}$ where the true mean is $\mu = 4$ and true standard deviation is $\sigma = 2$. Now, lets say we take three samples as follows:
$A = \{1,2,3,4\} , B = \{1,5,6,7\}, C = \{2,4,6,7\}$. How would the calculation of the SE look like? According to formula above it would just be $SE = \frac{2}{4}$ but according to those sources that say it is the standard deviation of the sample means then we would have to take the mean of means of these samples and find the standard deviation of the means. This gives a different result and it doesn't even begin to describe what would happen if for example sample $C$ has a different sample size.
The only way I can reconcile the above in my mind is the SE is defined only for one sample of size $n$ and not for multiple samples as some sources claim. Or perhaps even the definitions coincide but maybe only when having taken all possible samples with an identical size. Any help is appreciated in clearing my rather elementary confusion.