@chameleon has made some very good points!
There are various ways to tell when a bird has slowed down or stopped laying.
There's some physical exams you can do, as well as by observing their appearance and behavior.
With time and experience it's pretty easy to tell who is laying and who is not.
As far as how long a hybrid will lay...it depends, on the individual bird and maybe how they are managed.
Many hybrids lay like gangbusters for 2-3 year then just stop laying and/or die.
Some will go for years beyond.
Eggs are a seasonal food.....not like the grocery store.
You may get no eggs in winter when the days are short.
Adding supplemental lights
might get you winter eggs.
Adding new chicks every spring
might get you winter eggs.
It can take a few years to figure out how to manage the production and population of a flock.
But to start you need to pay special attention to the space you have to keep your birds healthy,
as well as the future integrating of new birds.
https://www.backyardchickens.com/a/how-much-room-do-chickens-need