Hi fawzy73
To design a solid state relay you need to use combination of one P mos and one N mos or perhaps two N mos . to be sure that mosfets won't get heated , you'll need to be sure the GS voltage that you've gave them is enough and it is nearby maximum GS gate source which mentioned in datasheet .
A question : why you are attempting to design a solid state relay yourself ? why you don't use analog switches which are widely available ?
Anyway , for more guidance the schematic that you've built is required . so please attach it then i'll help you to remove the problem .