Getting a job and quitting PhD at university in UK I am going to be straightforward in here. I am currently doing PhD at university in UK within the field of power electronics. However my previous background was related to general Energy Engineering (i had some modules in electrical engineering, however majority was related to thermodynamics, heat transfer, some chemistry, fuels, combustion), thus I had a lot problems in adjusting to the topic (systems modelling, Matlab Simulink, signal processing) and I am still not feeling confident in this field. But straight after graduation I did not have many options and one of my module leaders told me about available PhD position at the same university, where I did my master. I started by the end of November 2017. I participated in a few, very professional progress meetings and all the time I felt lack of confidence in power electronics' field. Thus it was full (extremely) of stress. Since then relations with my supervisor become very cold, however I got some friendships with my office colleagues (but I have a lot of problems talking about my research project being aware that I can easily make a mistake and say sth stupid). Suddenly (like 3 months) ago I noticed Graduate Scheme job offer in the building close to department and I made an application. It's not a typical job as the 'company' is on the campus and project is research-based but with normal salary. I was rejected after assessment day, but suddenly (yesterday) i got an offer. They asked me whether I am still interested, I said yes - waiting for formal contract etc. 

I am aware that many people regret decision about withdrawing from their PhDs as it become difficult to come back. But this job is not a typical office one, it's in the lab with manufacturing, processing etc. and even description said that can lead to PhD. What would you do? I am ware that some tough decision will be in front of me - asking university to withdraw me from PhD program, but I know that I will not get better offer than this, maybe ever. Other question - how long time before I have to inform university about withdrawal?
You say "no one needs to know about my PhD drop as my official graduation took place in 2018" but surely your CV would indicate that your Master's finished in 2017.

Anyway: I can't advise you on whether it is a good idea or not to drop your PhD for industry, since that is a very personal decision. However, I would note that in most UK universities that I know of (and almost certainly in a Russell Group university), the first year of a PhD has a kind of "probationary" status, at the end of which a student would be upgraded to "confirmed" status if all parties are satisfied with the student's progress. Therefore, withdrawing/transferring within the first 10-12 months is a bit easier and less problematic than doing it after 12 months; if the people in your department are sufficiently mature and professional, then they should accept that you have genuine reasons for your change of path.

You also ask how long you have to inform the university of your withdrawal. I would say that you should talk to someone ASAP - if you are not confident doing this with your supervisor, you should try to find the "Postgraduate Tutor" or similar person for your department, or even approach someone in the Faculty of Science. They can advise about practical matters such as terminating your registration as a student - universities nowadays have to be more machine-like in dealing with changes of registration.

BTW, you don't specify if there would be any issues about e.g. immigration status. I am assuming that there are no such issues, since the people who offered you the job should have discussed this with you; but if you are on any kind of visa or study permit then withdrawing from the PhD would affect this, and you would need to talk with the prospective employers about what to do.