When transforming a dataset using the square root (or any other procedure), does the standard deviation of the dataset get transformed too? Taking an introductory statistics course, and I am confused about the impact of a transformation on the df for a two-sample t-test. The df is dependent on n of each sample and SD of each sample, but I'm not sure if the SD changes during the transformation? My teacher is saying that a square root transformation would not affect the degrees of freedom, but I don't understand why that would be.

No matter what transformation you do, the number of data points remains the same. In that sense, if you just want to subtract the number of groups (two) from the number of points to get the degrees of freedom to use in your t-test, this does not change. Likely, this is what your professor means that the square root transformation does not affect the degrees of freedom.
If, however, you use the Welch test (unequal variance t-test, the default in R software t.test) with the Satterthwaite degrees of freedom, this equation uses the variances in the calculation of the degrees of freedom, $\nu$.
$$
\nu\approx\dfrac{
\left(
\dfrac{
s_1^2
}{
N_1
} +
\dfrac{
s_2^2
}{
N_2
} 
\right)^2
}{
\dfrac{
s_1^4
}{
N_1^2(N_1-1)
} +
\dfrac{
s_2^4
}{
N_2^2(N_2-1)
} 
}
$$
Consequently, the degrees of freedom calculation does depend on the transformed variances, which are likely to be different from the untransformed variances. (An exception would be if your distribution only contained $0$ and $1$, since the square root does not change those values.)
Let's look at a simulation in R software. By default, the t.test function uses the Welch test with Satterthwaite degrees of freedom, which changes upon applying the square root transformation. However, the var.equal = T argument tells to function to do the equal-variance t-test with the usual degrees of freedom, and the square root transformation does not change that degree of freedom calculation, since variance does not factor into the calculation, just sample size.
set.seed(2023)
N1 <- 30
N2 <- 39
x1 <- rlnorm(N1)
x2 <- rlnorm(N2)
t.test(x1, x2)$parameter                              # 54.51229 
t.test(x1, x2, var.equal = T)$parameter               # 67
t.test(sqrt(x1), sqrt(x2))$parameter                  # Now 60.07686 
t.test(sqrt(x1), sqrt(x2), var.equal = T)$parameter   # Still 67

Depending on how you calculate degrees of freedom, either of you could be considered correct, except...
(This next part is more advanced.)
...separate from those is how a professional statistician would (or should) think of the problem. By looking at the data and making the decision that you need to transform (let alone if you fiddle with transformations until you get one that looks good), you are consuming degrees of freedom. Even if you don't want to have the degrees of freedom depend explicitly on the variances through the Satterthwaite equation/approximation, the transformation should have an impact on the degrees of freedom. A term related to this is "phantom" degrees of freedom. The gist is that if you do analysis over and over and over and over until you get what you want (such as trying many different transformations until one looks good), you should account for having done so. "Phantom" is used because typical software outputs or calculations will not account for this.
