If it were mine...
Loosen the strings and pull them out of the nut slots and off to the sides.
If the nut is glued in place, put the edge of a steel rule or a dinner knife against the front face of the nut where it butts up against the fretboard and tap sharply but gently with a small hammer or similar. The nut should just pop off.
If the nut is not glued it will come off when you release the tension on the strings. Some people say that string tension is enough to hold the nut on and that you don't need to glue it. Well, that's true, but on some instruments the uneven tension on the strings will tend to pull the nut off-centre and you can get an end overhanging as you describe. Personally, I follow the practice of the builders of most of the several dozens of string instruments I've owned. As most of them have had the nut secured by a spot of glue, that's the way I go and it's always worked great.
If the protruding end was due to the nut being misaligned then clean any glue residue off the nut and off the uke and then put a
small spot of Titebond or CA glue on the side of the nut that faces the end of the fretboard (the side you tapped) and press into place. Replace strings and retune.
If the nut is too long, sand some off the offending end and then replace as above.
Alterations to the nut are easy DIY tasks and cheaply/easily fixed if you mess up. Approach with care, take your time, and you won't mess up.
Of course, if you're nervous, or not confident to have a go, then I wouldn't try to persuade you to try anything you're not comfortable doing.
:shaka: