magnifier glass app, on fingertip only
I think you are most likely to have seen what you are describing on an iPhone, however there is a similar function available as of Android 9.

You can use the Magnifier Widget on a piece of text by highlighting it and dragging the selection handle as shown on this page.

You can drag the handle around to magnify any of the text on-screen, one downside though is that the magnifier will 'snap' to each line of text which can take a little getting used to.