If you want to be able to trim off the ends, I suggest a double fisherman’s instead (aka the double overhand stopper) with both strands (hold them together while you tie and treat them as a single strand).
https://www.animatedknots.com/double-overhand-stopper-knot
With either knot, after you trim, you can melt the ends of the elastic cord. It will “mushroom” a bit, which will also prevent the tips from creeping into the knot and coming loose.
Oh wow. You have so much more wonderful DS9 ahead of you still!