Canon Quotes from the Books
"Precisely," said Professor McGonagall. "Black and Potter. Ringleaders
of their little gang. Both very bright, of course -- exceptionally
bright, in fact -- but I don't think we've ever had such a pair of
troublemakers --"
Harry Potter and the Prisoner of Azkaban
Your father and Sirius here were the cleverest students in the school,
and lucky they were, because the Animagus transformation can go horribly wrong
Harry Potter and the Prisoner of Azkaban
Look, Harry, what you've got to understand is that your father and Sirius were the best in the school at whatever they did-- everyone thought they were the height of cool
Harry Potter and the Order of the Phoenix
'Well, I thought that (DADA) paper was a piece of cake,' he heard Sirius say. 'I'll be surprised if I don't get "Outstanding" on it at least. '
'Me too,' said James….
…'I'm bored,' said Sirius. 'Wish it was full moon. '
'You might,' said Lupin darkly from behind his book. 'We've still got Transfiguration, if you're bored you could test me. Here . . . ' and he held out his book.
But Sirius snorted. 'I don't need to look at that rubbish, I know it all. '
Harry Potter and the Order of the Phoenix
See above quotes taken directly from books. People often forget how smart they were, James and Sirius weren't just some bullies or pranksters , this is often overlooked. They didn't even have to put in the work, natural genius. Sure there were plenty more wizards with more knowledge than them (and they could probably recreate something if they knew of its existence) but that doesn't necessarily mean they could think outside the box or be as creative to come up with it themselves.