If you have at least Tasker version 5.4.6b (you might need to join the beta) you can directly import this project from here. Otherwise download the attached file.
In case you don't remember, Now On Tap was a feature that existing before Google Assistant was a thing. You would long press your home button and it recognized whatever was on your screen and gave you info about it.
Google removed that feature when Google Assistant came out, but we can bring it back using Tasker, Google Lens and AutoShare!
This is how it'll look like:
Then add the tile to your quick setting tile list and click it to get the Now-on-tap-like functionality!