That’s a question only trial-and-error and dedicating yourself to improvement can answer. For now, the optimal lifting is the lifting that you do. If you are squatting, deadlifting, pushing and pulling, you’re already miles ahead of the poor souls who never leave the treadmill.
I just ran 5/3/1 when I dropped a lot of fat. That’s not an “optimal” fat loss lifting plan according to the experts, but I dropped a ton of fat and didn’t really lose any strength. It was a huge success for me. That’s all that matters.
Look around and see what programs and set/rep schemes resonate with you. Find something you believe in and run it like hell. Don’t overthink the details of your lifting. Squat, hinge, push, pull and make sure you’re nailing your food prep. Eat to recover but still keep your scale weight trending downwards, good things will happen if you do.