How else would you do it? The hot black (line) from the power source, and the black (load) to the fixture. The switch completes the circuit. What your missing is a ground. It’s quite simple the Kasa switch and most other smart switches will require a pigtail off the neutral.
The neutrals are always tied together to complete the circuit. The grounds are also always wire nutted together.
Read the piece of paper that comes with the Kasa switch it tells you exactly how to wire them. Should take about 5 minutes.