what command should i use to read and write through spi.tranfer command
In the LM74 the third byte you send (or more specifically the last 8 bits of up to 32 bits past the 16th bit that you send) is read and used as the configuration register setting.

Since the configuration register only has two states 0xFF is go to sleep sleep and 0x00 is do conversions (as shown in table 1 of the datasheet).

So:

0x00 0x00 0xFF


means get one result then go to sleep.

0x00 0x00 0x00


means get one result and stay awake.

If the LM74 is currently asleep from an 0x00 0x00 0xFF sequence the result you get returned is not a temperature but the chip's manufacturer ID.

It's not an obvious method of controlling a chip, and it's actually pretty poorly written in that datasheet, so don't feel bad about not understanding it, it took me a few moments to understand it.