How do I know which is the first memory module socket?

Normally the memory module sockets (slots) are marked 0, 1, 2, 3 etc… with socket zero being the lowest. If there are no markings on the motherboard, the socket nearest to the CPU is normally considered socket zero (or the first socket).