You can get visa again if.....
It depends on why your AOS was denied.
If it is for some felony, misconduct, perjury or something on the negative side then you may find problems in getting a new visa
Otherwise you can get a new visa after one year.
Not everybody who comes to USA wants a GC, they go back after 6 years and come when here on work when necessary.
Denial on AOS is not denial for work permit...provided you are clean