Both 'stupidest' and 'most stupid' are correct. It's difficult to give a good explanation of why. Two-syllable adjectives are the most difficult to explain, because they're inconsistent (welcome to English!). Of course, two-syllable adjectives in -y generally have superlatives in -iest. Some two-syllable adjectives with the stress on the first syllable have superlatives in -est, such as 'clever' and 'quiet'. 'Stupid' also falls into this category, but 'most stupid' is also possible. Unfortunately, with two-syllable adjectives, the only way to know for sure is to look it up in a good dictionary.