Gym advice pls

Okay so I’m new to the gym life and I don’t know where to start. I’m just trying to loose weight so I’m thinking cardio? Treadmill and bike? Do I have to stretch and warm up? How long should I stay to start with? 30mins, 45mins and then just increase the time as I go more and more? Idk where to begin I feel overwhelmed. Help!