This post just demonstrates a simple P5.js widget for Conway's Game of Life. If this simulation gets to a stable state or you are board, you could just refresh the page to see another simulation starting from a random state. There are already many great discussions and guides on Conway's Game of Life available online, so you could check them out.
If you are curious to see my implementation of it, my code is available on my GitHub. That version also gives you the ability to edit the grid by clicking on the cells.
Feel free to contact me at aryan.abed[at]pm.me