The size of the surfboard you get also depends on several factors including your height, weight, and surfing experience. Generally, a taller person may need a longer board, while a shorter person may prefer a shorter board.
As a good rule of thumb, 3ft longer than your height is a good starting point. It's also important to consider your weight, as a larger person may need a wider board with more volume to support their weight and vice versa for someone who weighs less.