so today i turned off my pc and went outside,when i came home i turned on the pc and nothing happened blackscreen and cpu fan not working(gpu&psu are working)
Hey sheshayo,
Usually the computer will refuse to turn on fully if the CPU fan is not active for safety reasons.
Be sure all connections within the fan are on, reseat connections and try again.
Try unplugging everything and letting it sit for a few mins.
If the fan doesn't turn and it is connected you can try remounting it/reinstalling it with new paste of course. If that doesn't help the cooler itself may need to be replaced. It's sometimes easier just to buy an aftermarket cooler of the CPU fan is an older one that came with the CPU.