Load the software center and look for the application. If the application shows up there, you know it was installed by one of the supported ways, apt or snap. Also manually installed .deb packages may show up there.
Some packages installed through apt are not visible in software center. You can use apt or Synaptic package manager (not installed by default) to see whether these packages are installed or not.
All other ways of installing packages are not officially supported by the distribution. If you installed through flatpak, you can list packages with flatpak list. Even these packages may show up in the Software Center if you installed integration of flatpak with Software Center.
For other packages outside of any package system, there is no way to directly know the source. You may have compiled the package or have used an installation script that copies application files to your system directories. Appimages are run from a directly executable image file which is somewhere on the system in a place where you or your sysadmin placed it.