A drawstring bag
Hem the top into a channel wider than the cord. Sew the side seam but stop inside the channel, or leave a gap in the channel stitching, so a bodkin can get through. A closed channel with no opening is a bag you cannot thread.
Two exits make a bag that cinches from both sides. One exit makes a simple pull. Either is fine if you planned the gaps before you sewed the hem down.
Cord, tape or a strip of the same cloth all work. A very thin cord in a wide channel disappears into the cloth. Match the sizes. The peg bag is a different shape, with a hanger.