How to get current (foreground) activity name?
Using apps: Current Activity and some similar apps will display the info in the form of floating texts above the screen content.

Using adb (from your PC): dumpsys window windows | grep -E 'mCurrentFocus', or dumpsys activity top (for full info meant for developers)