The more advanced your government is, the faster you earn them (check here for more information).
Envoys are earned (or maybe trained) with Influence points which come as a natural result of your government activity.It is the focus of the brand new City-State Influence system in Civilization VI, which is suited to all the major changes which happened in this aspect of the game. The Envoy is a diplomatic representative of your civilization that acts as your agent in city-states that you've met.