How do pta patch approved phones work?

I wanted to to know how do pta patch approved phones work (I do know a bit about custom roms etc) and how can I patch devices myself ( what are the basic need before I pay h a phone) and how long do they work since I recently bought Motorola g stylus 5g 2023 and it shows the IMEI of a vgo tel i550? Is there any risk involved in this?