Will getting a B in math [linear algebra at a college] as a prospective math major hurt my chances at top schools?

College math departments that offer highly proof-intensive versions commonly offer “ordinary” versions for non-math majors who just need linear algebra as a tool and more proof-intensive versions for math majors (e.g. Harvard Math 21b versus 22/25/55 or Brown Math 0520 versus 0540). The OP would likely derive little benefit by repeating the “ordinary” versions, but could benefit learning-wise from the more proof-intensive versions.