DNS 2nd-level sub-domains

How do I create a 2nd-level sub-domain? Example, for example.com, I need to create a sub-domain staging.example.com with hosts such as mongo.staging.example.com.

You just need to create a DNS record of mongo.staging. One thing to keep in mind is that Cloudflare Universal SSL will not cover any second level subdomains.