See if the part that remains in the floor, and the piece removed, are attracted to a magnet. If not, they are not steel.
I suspect that the pipe down the hole could be lead. And the part broken off, brass.
So maybe somebody could solder new brass into lead. I am not a plumber. Maybe, if the dimensions are right, I would consider using a glue, such as epoxy, to insert new brass into lead, as an expedient.
Also, what you had before was probably an S-trap. Those are no longer allowed, because they can siphon out if you don't finish your water draining in the lavatory with a low flow.