The .otf files contain the font, and if there are several this means that the font has different weights and variations to install. The .txt file contains licensing information about the font.
Just make sure that you download fonts from reliable sources to avoid malicious files. If you receive a warning from macOS ...