Connect a lamp wire to one wire or three
The connector with 3 white wires, one of which goes to your lamp, is neutral. That is fine as is. The black wire from your lamp is the hot wire for the lamp and goes to a switched hot, which logically should be the The wire connector with one wire from the ceiling is disconnected from anything. So connect the black wire from the lamp to that one lonely wire from the ceiling.

In case you didn't do so already, the safe way to do this is to turn off the breaker for the circuit before reconnecting the wires. Then turn on the breaker and turn on the switch. If anything goes wrong, the worst that will happen is you will trip the breaker. If you do this while the breaker is on - i.e., circuit possibly live (switches can fail) - then you might be just fine, might get a little spark, but might - if all goes wrong - have quite a shocking experience before the breaker trips.