Dear student,
To ensure that the natural supply of nitrogen in restored to the soil, farmers can use crop rotation, where after the main crop is harvested, one field of legumes are sowed. The legumes contain nitrogen fixing bacteria in their root nodules which convert atmospheric nitrogen into nitrates and nitrites which can be absorbed by the plants, thus restoring nitrogen in soil.
Regards.