https://www.researchgate.net/publication/255828400_The_EUV_Emission_from_Sun-Grazing_Comets/figures?lo=1 lists significant amounts of N in comets (as ammonia and methane) , but P and K don’t make the top 8.
In the universe, N is 300X more common than P and 3000X more common than K https://en.wikipedia.org/wiki/Abundance_of_the_chemical_elements#/media/File:Elements_abundance-bars.svg . The elemental composition of the solar system is about the same as in the universe in general. Unless there is some process which selectively concentrates P and K in comets and asteroids, these elements will be poorly represented.
Rather than 20/20/20 fertilizer, you are looking at 1/0.003/0.0003 fertilizer from ground-up asteroids.
On Earth, P containing deposits are created by biologic processes such as settlement of marine organisms. In space there is a marked shortage of marine life, water and gravity so this mechanism does not apply.
Similarly, K deposits are formed by evaporation of seawater.
On Earth, we use an open-loop system, mining geologic P and K. We use excessive amounts, which is discarded in surface water and ground water.
Any space farming will likely be a closed loop system with P and K recycled as fertilizer.
In space, the P and K would be recycled from sewage and astronaut corpses.