You can use nearly and approximately to describe measurements, but nearly usually means it is less, whereas approximately means a little less or a little more.
The snake was nearly six feet long. <-- almost six feet, but still less
The snake was approximately six feet long <-- about six feet, maybe a little shorter, maybe a little longer.
He is nearly 50. <-- not quite 50 yet
The universe is approximately 13.5 billion years old. <-- give or take a few years ;)
When used in other ways...
I nearly hit that tree. <-- correct
I approximately hit that tree. <-- incorrect
Approximately is used mostly for measurements
Nearly is used for measurements and to describe other events.