With many changing over to all-rope halyards from rope/wire spliced ones, another decision that comes is whether or not to splice a shackle onto the line.
Tying halyards on is another option, but often the length of the knot will interfere with a full hoist. However tying them on avoids the cost, hassle and potential whack on the head from a shackle and is easy to do. It also allows you to end-for-end the halyard, or simply trim a foot or so off a few times if wear or chafe becomes an issue.(For this reason it's not a bad idea to make it several feet too long from the start.)
Here's a knot we've been using for years without issue, and it's lower profile than any shackle. I was told it's called an "Aussie bowline" (sorry TD..) but I'm sure it has another more proper name somewhere. As the sequence indicates it's essentially a figure eight and a half hitch. The "loop" locks/chokes on much like a bowline's. I like to keep the tail a bit long and pointing aft so that the stopper is not strained, it can't get jammed against the mast in any way, and is easy to undo.