How do I add a switch/closet light to the existing end line light switch?
If the wall switch only has 2 wires, it is called a switch loop. The closet light and switch cannot be extended from the current switch. The closet switch and light need a neutral, and that seems to end at the lighting fixture.

If you can run a two wire cable from the fixture to the closet switch and then to the closet fixture, the setup is simple:

Connect the neutral in the new cable to the neutral in the old fixture box. Connect the hot in the new cable to the hot in the fixture box. This is also connected to the hot going to the old switch loop.

In the new switch box, connect the neutral to the neutral in a new cable going to the new closet fixture. Connect the hot to one side of the switch. Connect the hot going to the new closet fixture to the other side of the switch.