If we're comparing instantaneous risks, then I agree with your arguments. The most likely thing that could kill the most people today (in the next 24 hours) is a large nuclear war, followed by things like a nearby supernova, gamma ray burst, etc. An asteroid large enough to wipe out half of humanity before Saturday is really unlikely to be close enough to not have been observed already.
In the first atomic bomb test the atmospheric ignition risk was not a conditional probability over the next 50 years or more but an estimate of P(ignition | nuclear detonation next week). Very tightly bound immediate risk. P(detonation next week) was ~1.
When risk is estimated over the next 50 or 100 years the probabilities change quite a bit, especially because it's possible (though unlikely) that every nation cooperatively disarms its nuclear stockpile. Disarmament is not possible today so it can't count against that risk. It is a factor in the 50-year risk.
Climate change, AGI, asteroids, pandemics, biowarfare, etc. all become potential risks in the longer time scales, but their conditional probabilities are much fuzzier. That doesn't mean it's useless to try to measure the probability; when assigning dollars to counter risk it makes sense to spend relative to the expected utility loss of each potential outcome, times the probability of being able to change the outcome. There's very little reason to spend money on short timescales to avoid a nearby supernova or a gamma ray burst pointed at us. There's nothing we can do. We can do things about nuclear weapons, climate change, AGI, etc. But we need accurate probabilies to avoid the failure of devoting 100% of GDP to the current biggest risk.
AGI is not a threat within the next day or probably the next year, and even if it was it would be almost certain that events are already in motion and nothing could be done. Dealing with AGI risk means spending an appropriate amount of money to offset risks that might appear more than a year or two out.
Searching the skies for unknown asteroids is worthwhile because only with enough advance warning can anything be done, and it's quite likely we could avoid a strike with enough warning (years).
It's in everyone's best interest to disarm every nuclear weapon but there's a strong defection incentive to be the last one with them which we also have to be realistic about. Achieving zero nuclear weapons is likely to require a one-world government which is unachievable in any short or medium timeframe. What do you propose we spend money on that actually moves the conditional probabilities away from global nuclear war? Do those proposals (even with ludicrous amounts of money) have a higher likelihood of success than risk-dollars-adjusted reduction of climate change for example? If not, then we can't prevent nuclear war at any cost as you originally proposed. In fact we can't prevent nuclear war in the first place; there is no set of concrete steps (short of globally synchronized sabotage) to take this year or even next. Human beings will have their fingers on the nuclear triggers for the foreseeable future. We have to mitigate the other risks that we can right now otherwise it's a waste of money. Hopefully as the world becomes more stable it will eventually become possible to actually prevent nuclear war through disarmament.