How can I stop other people from joining my challenge without ending the challenge for everyone?

In order to stop new people from taking part in your challenge, open the share screen from the recording screen of the respective goal. In the code tab, click on Tap here to unshare to stop sharing the challenge.

From now on, no additional users can take part in your challenge. This does not affect the people who are already participating.