Dataview to show tags and the line of text within which they are found

I don’t think DataView can do that. Check its documentation. ChatGPT gives bad advice about Obsidian.

A simpler way to do this is an embedded search:

~~~query
tag:sometag
~~~
5 Likes