At the bottom-left of your dock, click on the Finder icon.
Go to Finder > Preferences.
Make sure that "Show all filename extensions" is checked. Now, you should always see file extensions in macOS.
I always keep an eye on my MacBook's battery percentage—especially since, as a developer, I run a lot of resource-intensive applications.