I guess I will have to upgrade either to Windows 7 or to Debian (if it won't work too slow) because many applications including browsers don't work on XP anymore.
Windows 10 is pretty resource efficient. There's even a stripped back 'long term support one' which is incredibly lightweight. Anyway, RAM is incredibly cheap now, I don't think you should be risking getting totally pwned for the sake of an investment in a few GB of ram.