About Countries by Military Spending
This is a country's military spending as a share of its GDP, not a total in dollars. That is a big difference. The United States spends far more money than any other country, but its share of the economy is not among the highest, because its economy is so large.
The highest shares usually belong to countries in or near conflict, and to wealthy Gulf states that invest heavily in defence. Ukraine, Israel, Saudi Arabia, Oman and Algeria have all been near the top at various times. Western European countries have traditionally stayed in the low single digits, and a few, like Costa Rica, which abolished its army in 1949, spend very little at all.
For guessing, look at who faces a threat or an active war. The caveat is that many countries do not publish reliable figures, wartime numbers are often estimates, and the share rises or falls whenever the economy changes size. The data also trails the present, so recent increases may not yet appear.