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

You know what’s the most important school ? The safety that you’d presumably be happy at and you can afford.

So the hard work is over.

Now take your shots. No point in panicking. If you want to apply to x school in x major, do it.

Worst thing that happens - they say no.

You already have that safety.

As a math major, you will be in high demand - notice I didn’t say if from x school.

Take your shots, don’t panic, and best of luck.