It would be impossible to do this justice in a single answer. In a nutshell you should start small and work your way up.
Get a reliable hardware/software setup for the device you're going to work with.
Choose a simple programming set e.g. arduino (vs micropython vs lua) to get started. Be prepared to switch to more advanced tooling as you gain experience.
Fully understand the programming model and libraries in use along with the capabilities of the device e.g. sleep mode, connecting to wifi, writing to serial connections, ...
Start out just using switch for input, multimeter or LEDs for output to check your understanding and use basic hardware.
Then once you are comfortable and know how to program the device to get the outcomes you want you will be in a position to start to incorporate more complicated setups including sensors.
If you try to go to complex to quickly you'll get frustrated as a result of lack of experience and lose interest...
Good luck!