How to wire 2 lights to one switch
I've heard some places are requiring fan-capable wiring to all ceiling boxes.  IDK if your code states the motivation but maybe that's the motivation.   The third wire allows future installation of a ceiling fan. If that is what your code requires you to install, you don't need a diagram. Just daisy chain the two lights from the switch in the normal way with 2+ground wires.  In the switch, and in the light at the end of the chain you cap off the third wire.  In the middle (first light) connect the third wires together.  That way you can later install a fan at the second box without opening the first box.  You probably don't HAVE to do it this way, you can just cap off the third wire everywhere ... but why not go with the spirit of the code?