It may have damaged both, lightning will do that.
The main board for your model dryer is part #
W10111621What other board are you talking about, this one, part #
W10336133The second one I listed, W10336133 is a user interface type board.
I would replace the
W10111621 first as it's the main control board, but there is a chance that lightning could have damage them both.