Do programs keep running on macos when user switches account? I am wondering if programs keep running when users switch account, alas account is locked and another user account logs in.
For instance, user Mike runs Photos (that will start curating pictures), then locks account and user Sue logs in to other account; will Photos instance keep running in Mike account in the background?
Yes, the applications will continue to run in the background. This happens with Fast User Switching and when Locking then logging in.

Monitoring

You can see the other users' applications are running through the Activity Monitor application:


Applications > Utilities > Activity Monitor.app


To see other users' applications, select the menu item:


Activity Monitor.app > View (menu) > Other User Processes