In fact, a very small number of people cannot be vaccinated, and I am sure the laws and rules make an exception for them. It would only be discrimination if it excluded people for something they have no control over and cannot change, such as their sex or skin color.
In the UK, and I'm sure also US and Canada, there are medical exclusions from vaccine and mask mandates.
There is even a nice (optional) badge you can use that says you are medically exempt - it helps if people do not understand this.