Old (Simple) Answer
"Stealing" and "who stole" my wallet both work, although they have different meanings.
If you're talking about someone who stole your wallet, you'd refer to them with "It must have been someone who stole my wallet".
If you're talking about the event in which your wallet was stolen, it would be "It must have been someone stealing my wallet".
If you're trying to say that the reason your wallet is missing is that it was stolen, you might consider "Someone must have stolen my wallet" or "It must have been that someone stole my wallet".
Incidentally, "have been" followed by the gerund form ("ing" for most verbs) puts the verb in the "Perfect Indicative" form.
New (Overly Complicated) Answer
I have updated this to address some of the comments/potential cases that might come up in the real world.
Sentences can have multiple verbs in them, actually (remember, the sentence is everything from the first word to a period).
An example
In this specific case, it's probably helpful for me to mention that you can build up phrases that act the same way as a noun would.
For example, take the simple sentence
"I want a hamburger".
"I" is a noun (the subject of the sentence), "want" is the verb, and
"hamburger" is a noun (the direct object).
If I want to be more specific, I can build up a phrase using nouns, verbs, adjectives, etc. that function just like a noun would. Really, in the above example, you already have a noun phrase "a hamburger" is already a noun phrase, consisting of the article "a" and the noun "hamburger". These are all sentences where "hamburger" is a noun that functions as part of a slightly larger noun phrase:
I want a hamburger
[noun, subject] [verb, transitive] [noun phrase, direct object]
I want the hamburger
[noun, subject] [verb, transitive] [noun phrase, direct object]
I want hamburger
[noun, subject] [verb, transitive] [noun, direct object]
(Individual nouns work as noun phrases, too. I could have written "noun phrase" beneath the word "I" in each example and the individual word "hamburger", I just didn't)
I can build this up into something more complicated, too:
I want a hamburger with tomatoes and lettuce that has been covered with mayonnaise
[noun, subject] [verb, transitive] [noun phrase, direct object]
If you /really/ want to dive deep into it, I find this diagram helpful, but if it confuses you just ignore it- it's not something the average person would know about (although if you're curious, this is an example of a "syntax tree" and you can probably find examples of it in your native language)
https://media.geeksforgeeks.org/wp-content/uploads/20200330000517/Screenshot-2020-03-30-at-12.02.08-AM.png
Back to your question
Your question is slightly complicated. First off, I can tell you that "It must have been someone stole my wallet" is going to be considered incorrect in formal writing.
First and foremost, I want to explain "must"
Must
Must is what's called a modal auxiliary verb. Don't dig too far into the specifics of this other than "can, could, may, might, shall, should, will, would, and must" can't be used without some other verb (whether you actually use it or whether it's implied. You could respond to a child asking you "May I play video games?" with "You may "). The history behind these words is complicated and weird (shall and should are related historically, for example, but they mean different things to most speakers), so it's better just to look at a list of ways people use each one.
"Must" is used to express certainty (or near-certainty) or requirement. If I say "It must have been x", I'm using it in the following way:
- If x is a person, action, or thing, I could be saying "I'm pretty certain that it was that person/action/thing that [insert conversation topic here]"
To shine some light on the rest, let me lay out the possible meanings here explicitly:
It must have been someone stealing my wallet
- "It must have been someone stealing my wallet" can be viewed two ways (since "someone stealing my wallet" could be referring to the person doing it, or to the action itself):
- You are putting emphasis on the person. Here, "it" is either a dummy/an impersonal pronoun. "I wonder who that was? Oh, my wallet is gone! It must have been someone stealing my wallet")
- You are putting emphasis on the action. Here, "it" is either a dummy pronoun or referring to the event of your wallet being stolen. "Why is my lock destroyed? Oh no! It must have been someone stealing my wallet"
It must have been someone stole my wallet
I want to emphasize that this is a niche use that you would usually only see informally/with certain people. I would never use this construction, personally.
You could possibly use this to put an emphasis on the action in the past tense "I'm recalling details about my day... Wait, why was my lock missing? Oh no! It must have been <that/due to the fact that> someone stole my wallet, then put it back"- notice the "put it back" part, though. If this didn't happen, you'd just say "It must be <that/due to the fact that> someone stole my wallet" (and you could use this in any case).
You'd usually include the word "that" anyway (I don't have a good reason for this offhand other than that dropping the word "that" sounds weird), but I wouldn't be surprised if it got dropped in informal speech/writing sometimes. I would not, however. I also want to say that it's the only one of the three that my grammar-checker is yelling at me about.
In the event that you were referring to a person here, you need to say "It must have been someone that stole my wallet" or "It must have been someone who stole my wallet". There might be certain dialectical exceptions to this, but it wouldn't be standard writing.
It must have been someone who stole my wallet
- "It must have been someone who stole my wallet" can be viewed in one way (it can only refer to the person):
- You are putting emphasis on the person. Here, "it" is either a dummy/an impersonal pronoun. "I wonder who that was? Oh, my wallet is gone! It must have been someone who stole my wallet")