On a Mac, an app and its windows are separate things. The red button closes a window; the app stays running, with its menus still at the top of the screen and a small dot under its icon in the Dock. Click the icon or press ⌘N and it opens a new window at once. This is normal, not a bug, and it is why Macs feel fast at reopening things.
To quit for real:
- ⌘Q, or the app's name in the menu bar → Quit.
- Right-click the Dock icon → Quit.
- ⌥⌘Esc opens Force Quit for an app that stopped responding.
A few apps do quit when their last window closes (System Settings, Calculator, Photos), and macOS quits idle apps on its own when memory is short. Leaving apps running costs nothing noticeable.