A point of terminology: Americans often use the word "customs" to mean "immigration," but these are two different things.
Immigration (passport control) is control of people. You will not go through immigration flying from Amsterdam to Oslo, since they are both in Schengen. You will go through passport control (emigration in this instance) upon leaving Oslo, since this is your exit point from the Schengen zone.
You will go through immigration on arrival in Oakland. You will then pick any checked luggage and go through customs (see next below).
Customs is control of goods. You will go through customs flying from Amsterdam to Oslo since the Netherlands is in the EU and Norway is not. However, in Europe this is just a matter of walking through the Green Channel Nothing To Declare line. Unless you are "randomly selected for additional screening" (rare but possible), you're done.
You will go through customs arriving in Oakland. This is not a walk-through; everyone has to get in line to hand their form to the customs official, who looks at it and decides if you warrant additional screening.
Security is a third thing. I don't know if you have to go through security when changing planes in Oslo on separate tickets. Any time you go through security, you will use your passport as your ID; this is not the same as passport control (they won't scan or stamp it).
As for the risks of using separate tickets in this situation (per Andre L's post), here's a good summary: https://www.tripadvisor.com/Travel-g41707-c207311/Newton:Massachusetts:Connecting.On.Separate.Tickets.html