hi there,
first, create your ID for JR-East to book via internet.
https://www.eki-net.com/pc/jreast-shinkansen-reservation/English/wb/common/Menu/Menu.aspx
you can check and book, cancel or change your JR tickets by creating your ID of it.
or you can also visit ticket office or vending machine at Narita airport to purchase on your day arrive.
(or any of Midorino-madoguchi at JR stations deals tickets)
charge is 6,840 JPY.
there are 2 stations at NRT - Narita Airport Station (terminal 1) and Airport Terminal 2 Station (terminal 2 and 3), and Narita express stops at both stations.
it depends on which terminal you'll arrive.
I recommend to book in advance in case they are sold out or you took time much more than you're expected after the arrival.
hope this can be your help!