The House elected Mike Johnson as the next speaker of the House on Wednesday as Republicans rallied behind his nomination after weeks of infighting.