Constraining three-nucleon forces with multimessenger data