The industrial production of fertilizer is only about a century old (Haber-Bosch process for nitrogen fertilizers). Fertilizers are mainly concerned with nitrogen, phosphorus and potassium.
Before industrial fertilizers existed, people replenished the soil with:
- compost
- manure
- crop rotation (e.g. https://en.wikipedia.org/wiki/Three-field_system)
Crop rotation works, because there are also natural processes which replenish these nutrients. For example, this is the nitrogen cycle:
https://en.wikipedia.org/wiki/Nitrogen_cycle
In particular, you can plant legumes, which will naturally bring nitrogen into the ground.
Either plant them as part of your crop rotation, or you can also plant e.g. potatoes and beans close together to continually replenish the nitrogen.