For generator affiliation, a transfer switch or interlock at the panel prevents backfeeding the grid
https://threadvistax.com/s/oKpLtbwmfWm1c6oMqsh0n
For generator interconnection, a transfer switch or interlock at the panel avoids backfeeding the grid, safeguarding utility employees and devices safely.