For stainless, I've found it to be a combination of making sure there's enough heat before adding food, being OK with using a bit more fat (e.g., oil, butter) than I initially expect, using the right utensil while cooking, and deglazing as necessary.
I use stainless for acidic foods (e.g. tomato sauces) and frying eggs. I use cast iron for pancakes, meats, and other items that benefit from the pan not being a perfectly flat texture or heat retention.
If I had to have a single pan, I’d probably go high carbon steel.
The trick is get the pan hot (not smoking hot, you’ve preheated too much), then put 1-2tbsp butter or cooking oil in the pan and spread it around. It should sizzle a bit and then mostly disappear, leaving behind a nonstick coating.