Based on a Google search, there are currently only 11 countries with nuclear weapons. Why is this case? Is it because of global policies to limit? Do countries know the process to create the weapons, but choose not to? Is there a knowledge gap restricting the creation?
All of those are important reasons. There are three groups of factors which impact whether country has nuclear weapons: political, military, and scientific.
Political realities impact whether states proliferate or not. South Africa's decision to make a nuclear bomb to use as a bargaining chip to defend Apartheid was driven by fears that Apartheid was under threat and some way to blackmail Western powers to Apartheid's if the need arose defense was required. Conversely, South Africa voluntarily and suddenly dismantled its nuclear program when internal political situations changed. Nuclear programs are extremely expensive, and for a weapon which can basically never be used, many politicians in various countries find the sheer expense a reason not to proliferate. In contrast, other states go nuclear to appear strong, regardless of the costs. It has been argued that France's quest for nuclear capability was driven mostly by the desire to appear powerful in the post-WW2, and rapidly decolonizing, world. For non-nuclear states, going nuclear risks alienating most of the world, so huge political risks exist for newcoming nuclear powers.
Militarily, nuclear weapons complicate matters. Every new nuclear-armed state risks incentivizing its regional enemies to go nuclear as well. They also have to be kept under strict control, something not all militaries are able to provide. Should they not be under strict centralized control, it could risk an unauthorized action rapidly escalating a war beyond its planned scope. They are also expensive, eating up funds which otherwise could go to normal -- and far more practical -- military equipment. Tactical nukes are an option, but the political ramifications of their use would be stratospheric and if a country is going to spend that much, they might as well go for the MAD-inducing strategic nukes. Yet strategic nukes have only one purpose, to prevent your enemy from living if you are going to die.
Nuclear weapons are complex, making technical knowledge a important component. Almost all the nuclear weapon states (the legal ones) and nuclear armed states (the illegal ones) have had at least some outside help. The US and UK worked together; the USSR managed to spy on the US; China received help from the USSR; France did much of the work by itself, but later had US assistance; France helped Israel; Israel (most likely) helped South Africa; India used Canadian civilian nuclear technology while Pakistan took Netherlands civilian nuclear technology and both expanded upon it; A. Q. Khan of Pakistan sold (perhaps with Pakistani approval, perhaps not) the technology onward to Libya, Iran, and North Korea. Fascinatingly, the Pakistani nuclear program was paid for by Saudi Arabia -- with most likely a clause mentioning that Saudi Arabia could gain the skills if/when necessary. Beyond the devices themselves though, the methods of delivery can also be complex and present another issue -- especially if the aim is to defend the country indefinitely with MAD (tactical weapon delivery systems are far easier to build than strategic ones).
Certain powers, famously Japan, are considered Nuclear Latent, they have the technical knowledge to make a bomb and maybe even facilities which can easily be shifted to nuclear weapons production, but they opt to not go nuclear. However, Japan maintains the capability to make a bomb most likely within 1 year. Many other Nuclear Latent states are said to take a bit longer, but the same principle applies. Other nations in this category are South Korea, Taiwan, Germany, Italy, and Australia.
Sources: James Goodby, The Nuclear Dilemma; Ariel Levite, "Never Say Never Again"; Joseph Nye, "Maintaining a Nonproliferation Regime"; Etel Solingen, "The Political Economy of Nuclear Restraint"; Scott Sagan, "Why Do States Build Nuclear Weapons?: Three Models in Search of a Bomb".