This is a custom Waybar Module that I personally use to show my phone battery in my waybar. Simply just shows either a phone or tablet icon and the device's battery level, with color coding for battery level. I bastardized this from multiple different scripts here on Github, and a whole lot of trial and error.
It is really simple to have the module show up in waybar, just make sure you have made KDEConnect.sh has been made executable by using chmod +x KDEconnect.sh in your terminal. Also make sure to update the path to the script in the Module itself. (If you are having issues with module showing up you can change "return-type" from "plain" to "json" and that may fix the issue)
Once you have this added to your Modules or your waybar config, you can just use the title "custom/kdeconnect" to get the module to show up in waybar.