How do I finish hand-sewing a seam? I'm mending my (second hand) leather gloves by hand.

My sewing skills are rudimentary, but I like fixing the seams of or patching up clothes every now and then.

However, I never know how to finish up a sewn seam. I usually just keep repeating the last stitch, alternating the angle a little bit, or the direction, in a random fashion (random perhaps because I reason that if it's hard for me to unravel, it must be so too for the thread itself).

I would like to know if there's a proper way to finish sewing a seam.
What I would do at this point with your gloves, is to take the needle and slide it under that last stitch (I took a close look at your pic) leaving a loop behind, then take the needle and slide through that loop to create a knot, you may need to do this twice. Then, I usually push the needle into the material and leave extra thread inside the work, cutting what is super extra or bothersome.
Create the knot

Hide the extra


These stitches shown here are just so I can show a sample, my stitch work is typically better. Though when I darn, I let it get messy. LOL
happy mending sustainability lovers!