Sonnet LXXV from Amoretti
One day I wrote her name upon the strand,
But came the waves and washed it away:
Again I wrote it with a second hand,
But came the tide and made my pains his prey.
Vain man (said she) that dost in vain assay
A mortal thing so to immortalize;
For I myself shall like to this decay,
And eke my name be wiped out likewise.
Not so, quoth I; let baser things devise
To die in dust, but you shall live by fame;
My verse your virtues rare shall eternize,
The girl whose name Spenser’s trying to sketch in the sand dismisses his actions as foolish, not believing anything will ever live forever. She says that she’ll soon one day be erased from the world (die) just like the sand when the tide washes up. 
 “Vain man” is a double entendre. She’s saying that he’s making his bid for immortality out of vanity and self-satisfaction, but also that this his efforts are in vain as he will never be able to make something immortal.
One Day I Wrote Her Name upon the Strand