The second derivative test for functions of two variables says to first find critical points. For each critical point one finds $$ D = f_{xx}f_{yy} - f_{xy}^2 $$ If $D>0$, the sign of $f_{xx}$ says something about whether the point is a local maximum or local minimum.
My question is: Why do we use $f_{xx}$? Could we use $f_{yy}$ instead?
You are assuming that $D >0$. This says that $$ f_{xx}f_{yy} > f_{xy}^2 \geq 0. $$ Hence either both $f_{xx}, f_{yy}$ are positive together or negative together. Since they have the same sign, the test works either way.