The modern slot machine uses an algorithm known as a random number generator, RNG, which does not use any form of memory to determine when a number should be generated.
The truth is that there is no trick to slot machines. They provide random results based on set mechanics and it all comes down to luck. With that being said, not all games are the same, so picking the right options is key, and you can still change the size of the bet throughout the session for better results.