Replace s::set ... from Kirby 2 with Kirby 4 stuff

What was that s::get() and s::set(...) in Kirby2 , and what can I replace it with in Kirby4?

Kirby 2 docs are still available in the archive: https://v25.getkirby.com/

Setter and getter for session values.