The payout percentage of slot machines in land-based casinos is set when they are built at the factory. Sometimes the organisation acquiring them has then option to change the RTP through the software.
The RTP of online slots is set by the developer or the operator. Land-based casinos usually have a much lower RTP than online casinos, and it is quite likely that the RTP is between 70 and 80%.
The RTP in online casinos is usually above 90%. This shows that playing online slots is much more favourable for the player, as it is more likely to win at the slot.
The reason why the online operators can do this is the lower cost of operation. They don't have to rent large commercial casino premises or employ many casino employees. Therefore they can give back their savings to the player, and offer them a higher payout.