For generator affiliation, a transfer switch or interlock at the panel avoids backfeeding the grid
https://tradesmanelectric.com/electrical-panel-components-explained-the-essentials-you-need-to-know/
For generator affiliation, a transfer switch or interlock at the panel prevents backfeeding the grid, protecting energy workers and equipment securely.