The error code is "P1346 TOYOTA - Variable Valve Timing Sensor Bank 1 Range/Performance Problem"
I would suggest checking the wiring make sure the plugs are working.
"Variable Valve Timing (VVT) sensor (VVT signal) consist of a signal plate and pickup coil. The VVT signal plate has 1 tooth on its outer circumference and is mounted on the intake camshafts. When the camshafts rotate, the protrusion on the signal plate and the air gap on the pickup coil change, causing fluctuations in the magnetic field and generating an electromotive force in the pickup coil. The actual camshaft angle is detected by the VVT sensor and it provides feedback to the Engine Control Module (ECM) to control the intake valve timing in response to during condition
Read more: https://www.autocodes.com/p1346_toyota.html#targetText=P1346%20Toyota%20Description,signal%20plate%20and%20pickup%20coil.&targetText=The%20actual%20camshaft%20angle%20is,in%20response%20to%20during%20condition."
Have a read and if you have a multimeter check the ohms/resistence to make sure its the same as the others inputs.