Comparison of basicity of o-phenanthroline and ammonia
A quote from here explains and give a good answer to your wondering:

Amines are the most basic of the common organic functional groups, but are still fairly weak bases. Protonation occurs on the non-bonded electron pair exclusively. The basicity of amines is directly dependent on the “electron density” at the nitrogen atom. Both inductive and resonance effects can alter the basicity of a nitrogen atom.
Hybridization on the $\ce{N}$ also affects basicity. An increase in $\mathrm{s}$ character on an atom increases the electronegativity of that atom which favors acidity and therefore disfavors basicity. Hence $\mathrm{sp^3}$-hybridized nitrogen is more basic than either $\mathrm{sp^2}$ or $\mathrm{sp}$ hybridized nitrogen.

The availability of this non-bonding lone pair is a factor of basisity. The 1,10-Phenanthroline is a pyridine derivative. Thus, both lone pairs of two $\ce{N}$ atoms in the ring system are contributed to the system's aromaticity. This make them not 100% available to incoming protons while the lone pair in ammonia is 100% available. Therefore,  in aqueous solutions, the basicity of $\ce{NH3} \ (\mathrm{p}K_\mathrm{a} = 9.3)\gt$ basicity of 1,10-Phenanthroline $(\mathrm{p}K_\mathrm{a} \approx 4.9)$. This is similar to $\mathrm{p}K_\mathrm{a}$ of pyridine, which is $5.2$ in water (comparison with piperidine is depicted in following scheme):

Keep in mind that there are some other factors are effecting the basicity of amine as well. For example, the ring sizes of cyclic amines (Ref.1):

The order is 5-membered $\ge$ 4-membered $\gt$ 6-membered $\gg$ 3-membered.
References:

Scott Searles, Milton Tamres, Frank Block, Lloyd A. Quarterman, &quot;Hydrogen Bonding and Basicity of Cyclic Imines,&quot; J. Am. Chem. Soc. 1956, 78(19), 4917–4920 (https://doi.org/10.1021/ja01600a029).