When one arrives at a door of someone's home, they can just walk in. But it is polite, I believe still, to ask if one may enter. Of course you could ask if you can enter, and the person inside could probably give you a quick assessment and determine that, yes, indeed, you are able to enter. But they would need to consider other factors like whether they know you well enough, are too busy for company just now, or just don't want you to enter before saying to may enter.
All this may cause you some consternation. Surely I know it can be frustrating to try to read this and make sense of it. I know you can. I think you may. But can or may aside, it is wise to know the difference before asking "Can I?" or "May I?"