Have you compared the versions of Stockfish in each?
In Lichess I think you can also choose different eval nets. There's a small one and a big one. That will affect N/s.
Have you compared how many threads each are using?
Furthermore, Lichess Stockfish is a WASM build while your local Stockfish is a native binary executable.
Many have already mentioned number of variations will significantly affect time to a certain depth.