Snort isn't in the official repository of any Linux distro, so you'll need to get it from the Snort website. On their downloads page, you'll see installer files in .rpm format for Fedora and CentOS, and a .exe installer file for Windows. However, you won't see any .deb installer files for Ubuntu. This is fine, because they also provide source code files that you can compile on a variety of different Linux distros. To make things simple, let's just talk about installing Snort on CentOS 7 with the pre-built .rpm packages. (At the time of writing, they still don't have a package for CentOS 8.)
You can get Snort and Snort training from the official Snort website: https://www.snort.org.