Waste cleanout plug too big or too small
First, measure the OUTSIDE diameter of the cast iron pipe where this opening is. Then go to the hardware store and by a Fernco coupler of the appropriate size. The coupler is basically a short tube made of rubber, with hose clamps.

You'll also need a PVC threaded cleanout fitting, and a cleanout cap. Pick the size of that based on the Fernco couplers available to you at the hardware store.