Lockstitch or overlocker
A lockstitch machine seams, topstitches, zips and buttonholes. An overlocker trims and wraps an edge, and it can construct a T-shirt. It does not sew a buttonhole or a zip in the ordinary way.
Buy the lockstitch first if you have neither. Add an overlocker when zigzag edges annoy you.
Thread, needles and feet do not swap freely between them. Read both manuals.