The flickering could be a hardware issue. Was it dropped or anything like that recently? If it randomly shuts down or freezes, you can try opening Task Manager and disabling your startup programs one by one until you find what causes the issue. Or just backup your important stuff and reset the machine. If resetting the machine (which will DELETE ALL YOUR DATA) doesn't fix the flickering, then it is a separate hardware issue too.