In most universities professors are encouraged to be transparent about grading, but whether they *have to* show you your grades is up to university/department policy.

If it’s important to you then seek recourse elsewhere: does your school have an ombudsperson or undergraduate academic support? If so - ask them to help mediate. It may also be helpful if you get other students on board: if you’re the only one complaining it’s less likely that you’ll be taken seriously.