What's the difference meaning between such expressions?
I took on the opportunity to teach...
I took up the opportunity to teach...
The two verb phrases, 'to take up' and 'to take on' are used in many different idiomatic phrases. The meanings vary and they have to be learned individually.
take up arms - arm oneself for a fight
take up sewing - start sewing as a pastime or occupation
take up a skirt - shorten the skirt
take on water - when a boat leaks water from outside
take on provisions - when supplies are loaded for a journey
take on a challenge - apply oneself to accomplishing something difficult
take on a boarder - rent a room in a house to someone
I agree with the comment that says we quite often don't use any preposition with 'take' in reference to an opportunity. It's not needed and it sounds affected or antiquated. To 'take the opportunity' is the normal way of saying it.
However, given the examples above, some listeners might understand a subtle difference between 'to take on the opportunity' and 'to take up the opportunity'. The first has the sense of accepting the opportunity.
I took on the opportunity to teach at college because it sounded interesting.
The second has the sense of beginning to take advantage of the opportunity
I took up the opportunity to teach at college at the time my daughter was born.