terminology
$A_{\text{G}}$- base area - Grundfläche$h$- height - Höhe (the height measured perpendicular to the base area)$h_{s}$- lateral height (or slant height)- Höhe der Seitenfläche$s$- lateral edge - Kanten der Seitenfläche$A_{M}$- lateral (surface) area - Mantelfläche$A_{O}$- total surface area - Oberfläche- apex - Spitze
volume
It can be shown that 3 pyramids with equal volume fit into any prism. Proof
So, the volume is
$$V_{\text{pyramid}} = \frac{1}{3} \cdot A_{\text{base}} \cdot h$$
Or, as in German text books
$$V_{\text{pyramid}} = \frac{1}{3} \cdot A_{\text{G}} \cdot h$$
surface area

This is calculated by adding the base area and the total lateral surface area (the area of the faces).
base area - Grundfläche
lateral surface area - Mantelfläche
Here, you find the total areas of all the lateral surfaces.
using Pythagoras’ theorem
to find the slant height of a regular square pyramid
$$h_s = \sqrt{h^2 + \left(\frac{a}{2}\right)^2}$$
where $h_s$ is the slant height, $h$ is the perpendicular height and $a$ is the edge length of the base (a square).
It then follows that the edge length of the lateral surface is
$$s = \sqrt{h_{s}^2 + \left(\frac{a}{2}\right)^2}$$
what to do if the edge instead of the height is given
Say the edge of a square pyramid is given and the base length.
Then, we can calculate the height h and the slant height $h_s$ has follows:
$$h_{s} = \sqrt{s^2 \color{yellow}{-} \left(\frac{a}{2}\right)^2}$$
$$h = \sqrt{h_{s}^2 \color{yellow}{-} \left(\frac{a}{2}\right)^2}$$
lateral surface (of a regular square pyramid) - Mantelfläche
$$\begin{align}A_{\text{lateral}} = A_M & = 4 \cdot \frac{1}{2} \cdot a \cdot h_s \\ & = 2 \cdot a \cdot h_s \end{align}$$
base area (of a regular square pyramid) - Grundfläche
$$A_{\text{base}} = A_G = a^2$$
exercises
There are plenty of exercises on Aufgabenfuchs on the pyramid.
truncated pyramid

One way to find the volume of a truncated pyramid is to find the volume of the entire pyramid and subtract the smaller one above. It may be necessary to determine where the tip (apex) is.
- h (height of the truncated pyramid, frustrum or “Kegelstumpf”)
$a_1$side of the top base$a_2$side of the bottom base
H is the height of the non-truncated pyramid

Using similarity, we can compare the following ratios
$$\frac{H}{H-h} = \frac{a_2}{a_1}$$
$$H \cdot a_1 = (H - h) \cdot a_2$$
Solving for H gives
$$H = \frac{ha_2}{a_2 - a_1}$$
To calculate the volume of the truncated pyramid, we need to subtract the top pyramid from the entire pyramid.
$$V = \frac{1}{3} \left[ H \cdot a_2 \cdot a_2 - (H - h) \cdot a_1 \cdot a_1 \right]$$
This formula can be simplified after quite a few algebraic steps to the volume for a truncated square pyramid.
$$V = \frac{1}{3} \cdot h \left[ a_2^2 + a_1 \cdot a_2 + a_1^2\right]$$
proof
$$\begin{align}V & = \frac{1}{3} \left[ H \cdot a_2 \cdot a_2 - (H - h) \cdot a_1 \cdot a_1 \right] \\ & = \frac{1}{3} \left[ \frac{ha_2}{a_2 - a_1} \cdot a_2 \cdot a_2 - \left(\frac{ha_2}{a_2 - a_1} - h\right) \cdot a_1 \cdot a_1 \right] \\ & = \frac{1}{3} \cdot h \left[ \frac{a_2}{a_2 - a_1} \cdot a_2 \cdot a_2 - \left(\frac{a_2}{a_2 - a_1} - 1\right) \cdot a_1 \cdot a_1 \right] \\ & = \frac{1}{3} \cdot h \left[ \frac{a_2 \cdot a_2 \cdot a_2}{a_2 - a_1} - \frac{a_2 \cdot a_1 \cdot a_1}{a_2 - a_1} + a_1 \cdot a_1 \right] \\ & = \frac{1}{3} \cdot h \left[ \frac{a_2 \cdot a_2 \cdot a_2 - a_2 \cdot a_1 \cdot a_1}{a_2 - a_1} + a_1 \cdot a_1 \right] \\ & = \frac{1}{3} \cdot h \left[ \frac{(a_2^2 - a_1^2) \cdot a_2}{a_2 - a_1} + a_1 \cdot a_1 \right] \\ & = \frac{1}{3} \cdot h \left[ \frac{(a_2 - a_1)(a_2 + a_1) \cdot a_2}{a_2 - a_1} + a_1 \cdot a_1 \right] \\ & = \frac{1}{3} \cdot h \left[ (a_2 + a_1) \cdot a_2 + a_1 \cdot a_1 \right] \\ & = \frac{1}{3} \cdot h \left[ a_2^2 + a_1 \cdot a_2 + a_1^2\right] \end{align}$$
q.e.d.
formula and exercises.
Here on Aufgabenfuchs