I tend to anchor my thumb on the top edge of the pickup. There are many who will espouse "floating thumb" technique, which is probably better for extended range basses (5, 6 or more strings). As has been said, whatever is most comfortable for you. Try not to press too hard if you're going to use the pickup - you might press it into the body reducing the response from the E string, or worse still induce stress in your thumb. It should be used as a point of reference rather than an "anchor"
Your next challenge will be damping the strings you are not playing. I tend to use both hands to do that, although it's not something I've done consciously, so I'd have difficulty explaining how I do it - I don't know!