Yes, you would declare the functions before using them in the main function.
(Although I think there is a way around writing out the entire function [defining the function] before you call it - as long as you declare it before calling it, and you define it later.)
If your projects get larger, you’re very likely to define classes and declare their methods (functions) in header files and define their implementation in header files. The main.cpp would tie all the functionality together.