BUDAPEST, Hungary—Hungary’s parliament voted Monday to ratify Sweden’s bid to join NATO, ending more than 18 months of delays that frustrated the alliance as it sought to expand in response to Russia’s war in Ukraine. The vote, which passed with 188 votes for and six against, was the culmination of…