For a trust to exist there must be at least one beneficiary, but there is no legal requirement that the beneficiary must be alive at the date the trust is created (as long as there are one or more other beneficiaries that are alive).
People not yet in existence can be beneficiaries by their relationship to someone else.
Homer may set up a trust under his will for his children and grandchildren. His children are the Primary Beneficiaries, they are named or better yet, not named but listed by Homer as “my children” – just in case he has more kids after making the will. The Secondary Beneficiaries would include ‘my grandchildren’
Homer dies with all of his children being about 12 years old or less with no grandchildren, but 20 years later when Homer’s son Bart has a son, that son will automatically be a beneficiary of the trust set up 20 years earlier because he is a grandson of Homer.
This has important estate planning and tax consequences as the grandchildren could be earning $20k per year and not paying any tax.