#1 - For ebikes that don't have an integrated tail light but do have an integrated head light, the easiest solution that does not require opening up and accessing the controller would be to splice into the head light cable, run it to the back while securing it with zip ties, and hook it to the tail light. That is by far the easiest solution but also probably the ugliest solution as the cable runs from the front to the back.
#2 - The second easiest solution would be to access the controller, use a Y connector to where the head light hooks up, and internally route the cable (till you can not anymore) and then secure it the rest of the ways again with zip ties.
#3 - The 3rd more complicating solution is to not just do #2 but also add an ebrake signal so that the tail light has both running red tail lights as well as ebrake tail lights.
and the #4 - would be to do #3 but add also turn signal with a switch to the handlebar.
The following tail light works with native 36V - 48V and allows you to do all 4 solutions 1-4 so you can start with the simplest and then go to the more complicating one without having to buy another tail light. BTW, the license plate bracket shown is removable. Also don't let all the wires confuse you. If you are not going to use the turn signals and ebrake individually, you can wire all the light sections together and end up with just 2 wires to light up the whole tail light. That should make for a much brighter tail light (and the more visible the better for safety) than wiring just the running lights.
https://www.amazon.com/dp/B07CGM21MZ/