Is it possible to change the processor and motherboard keeping the hdd same in which os is installed ?? Please helpTHANKS

you can use the same HDD, but changing the HDD from the system it was installed on (system A), and then putting it in System B usually does not work and does not just boot normally as if it were you old system, you need to backup your data, then do a clean install when you replace those components.