My dell laptop keeps turning itself on and off whilst I’m putting the password in.I’ll enter the password and it turns of

Solution
Does it start OK in safe mode? Try it with one RAM stick at a time if you have two, or different RAM. It may be a driver issue, could be a hardware issue.
Does it start OK in safe mode? Try it with one RAM stick at a time if you have two, or different RAM. It may be a driver issue, could be a hardware issue.
 
Solution
When this happens:
the CPU heatsink may be clogged with dust.
Or, the CPU fan may have stopped running.

Remove the fan and check the heat sink for dirt, also verify the the CPU fan is turning.