If you want your Mastodon account to be private, you need to do two things:
1. Set your default posting visibility to "followers-only", more info on this at https://fedi.tips/who-can-see-my-posts-in-mastodon-how-do-i-send-dms-in-mastodon
2. Switch on requiring approval for followers, so that no one can follow you without permission. More about this at https://fedi.tips/restricting-who-can-follow-you-in-mastodon
This doesn't apply retrospectively, any public posts you've already made will remain public. This just sets the default visibility for new posts.