Implementation of PoS

Hello everybody, i'm trying to learn by coding on openzeppelin but im still stuck with the implementation of PoS, i cant succeed at developing a correct function or algorithm for the staking function... :confused: can someone help me ? Thank you!
Ps: I am a lone developper who try to code for his own company, thank you everybody for time!