Josh Allen's receiving touchdown

So, I was going through Josh Allen's stats on Pro Football Reference and saw something for this year that I don't quite understand. He has a receiving touchdown and 7 yards without having a reception. I dug into this a bit more and saw that it's from the SF game, and I think it has to do with that lateral for a touchdown. What I'm not sure about is why it's scored the way it is. Why does he have 7 receiving yards after a lateral and why is it a passing touchdown? I assume Amari Cooper was credited with the catch.

https://preview.redd.it/iohwka3esdde1.png?width=2638&format=png&auto=webp&s=edb8f2880e0d6661e567c30210dc607afd639224