Iblis sinned first not Adam. The first sin wasn’t the sin of Adam, but actually a sin against Adam! Iblis (Satan) is the name of the devil, but he wasn’t always a devil. He became a devil after he sinned and refused to repent to Allah (God).
Just when Allah created Adam, Allah ordered the angels and Iblis with them to bow down to Adam, honoring Adam as he was created. The angels heard and obeyed, but Iblis disobeyed Allah’s order. that was the first sin and here is the full story.