Animals obtain nitrogen by eating plants which has absorbed nitrogen from the soil.
His experiment with his swan. Expedia flask disproved spontaneous generation in that broth was left open to air yet no life grew in the broth, the neck design of the flash trapped all possible contaminates. This broth today is still sterile despite sitting in a museum for decades.