for a neater edge (especially on a scarf or something that isn’t going to have the edge hidden in a seam.
cast off till you have one stitch.
stich the tip of right needle into the stitch below last cast off stitch (on the side–
________(cast off edge, with last stitch pulled to outside edge
Stick right needle into side edge of red stitch–and 'pick up (knit) a stitch
Cross the last cast off stitch over this made stitch, then cut yarn and thread yarn through the made stitch, and pull snug…
much neater ending to the cast off!