Yes it does matter on a light fixture that uses Edison base screw in lamps . The neutral goes on to the screw shell of the socket . The hot or switch leg goes to the center contact .
You do have a volt - ohm meter , don't you ? Measure from the earth grounds to one of the original colored wires , in the lighting box , with the switch on . One of the 2 wires should be hot with the switch on .
Turn the switch off and tie the black from the new fixture to that wire . Tie the white from the fixture to the other original colored wire . Again , all the earth grounds tie together .
Next time take digital photos before you take wires loose .
God bless
Wyr