In two-sample testing, when is it appropriate to use a t test or a z test

I searched Google under the key words "Z test and t test" to get these possible sources:

In the future, you can find the information you desire more quickly, if you use appropriate key words to do your own search.