It depends whether you are using the words as countable or uncountable nouns.
When used as uncountable nouns, there isn't a difference. For example:
Let's make some room
Let's make some space
There isn't enough room here
There isn't enough space here
How much room is there behind the car?
How much space is there behind the car?
When used in this way, they are synonyms.
'Space' is also used as the abstract concept e.g. 'The dimensions of time and space', and of course also refers to 'outer space'.
When they are countable nouns, they have different meanings:
'A space' is a gap e.g. put a space between two words
'A room', of course, is a division within a building, as in a living room, a bedroom.