How do we get the gear icon back on the top nav bar of modern pages? No changes have been made (design/CSS/master page). Gear icon disappeared from modern pages on April 24, 2019. The gear icon IS available on classic pages and list pages.
You have a customization that is interfering with an update made by Microsoft on your tenant. Most likely you've created a global object that's now colliding with platform code.
You'll need to update your customizations to back this out.
The reason I now this is, it happened to me as well.