How hard is it for nations to defend themselves?
Here's an interesting topic.
In RED DAWN the movie shows how difficult it was for the U.S. government and the American people to initially react to invasion.
Historically, every nation has problems with invasion, even militaristic ones. The best example is Russia, a historically militaristic nation under the czars and the communists. In 1812 and 1941 Russia was caught flat-footed before French and Nazi German invasion, respectively.
The answer is how effectively a country can respond to external foreign aggression or invasion.
The United States is fortunate, bracketed by the world's two largest oceans, the Pacific and the Atlantic. An enemy driving south into the U.S. must first traverse Canadian territory and the Canadians will resist. Or a foreign invader going north through Mexico will find also find and unwilling host. The Mexicans may put up resistance but will need active help from the U.S. This should not lull the U.S. into complacency and it hasn't. Pearl Harbor proved that and 9/11 reminded us of that.
An island nation like Great Britain has no strategic depth like Russia, China, the U.S., and other very large nations. The British know they cannot allow an invader to gain a foothold. Their defense plan calls for engaging an enemy invasion force at its embarkation point and on the high seas.