Hello, How far did you ride to get it back home? your XB 12 what year is it? Is anything broken or bent? Check your battery terminals to see if they are snug. then check to see if any fuses are blown .
If a fuse is blown replace it with the SAME type and Fuse size only. The Relays will need to possibly need to be checked. This is just to make sure nothing else shorted or broke.
Check the Small things FIRST.IF the Starter Turns over the Engine but the Engine will not run then you may need to check to see if there is spark at the Spark plugs starting with the front one first.
The Left side scoop will need to be removed to get up in there with a 5/8 Wrench. Take your time., and one thing at a Time .Watch the wiring around the scoop. SUCH as fuel light coming on (Yellow light) for 4 seconds .Is enough Fuell in the tank? Check the Regulator area . Post up with your findings. Good Luck. Jimi