I always take my shoes off upon entering a home unless it is whole house ceramic tile.
If I am to be a guest at a gathering where I know I will be there awhile, I will bring a pair of socks- usually funny ones.
I do not ask guests to remove their shoes, (unless they have high heels on as we have floors that high heels will damage) but I appreciate it if they do.
Note: Guys wearing sandals should keep them on- just wipe your feet.
I also keep new, fun footie socks (in a tucked away basket) and always offer them to my female guests if they remove their shoes…. they usually get a kick out of picking out a pair and I make them a gift.