There are two ways to deal with it. One I have done all my life and it is to cut the yarn leaving a tail and then pull the tail through the loop that is left. You can do that with a crochet hook or just make the loop bigger and poke it through with your fingers and then pull on the tail to snug it up. This leaves a little nub at the end which I always thought was unavoidable.
The other way that I just learned a few days ago is like this. Cut the yarn leaving a tail. Leaving the knitting needle in the last loop, pull up on the knitting needle causing the final loop to get bigger and bigger until the tail of the yarn comes through the loop. This leaves a flatter edge with no nub.
Either way you then have a tail there to work in and probably one or more other tails to hide. You’re done!