Go to the Discord app, and in the settings, go to Advanced and activate Developer Mode.
Now you have enabled hidden options of the Discord client. To find members or guild IDs, you can use the context menu. Click on the user avatar, channel name, or guild thumbnail and choose Copy ID.