How can I display content based on location of the user

So im creating a marketplace and I need to ensure that users from only 2 countries that I want can access the actual website or even see the data displayed. I want to be able to detect what country the user is in and automatically according to that allow them to search their address that only shows addresses from that country. I also want to display data only from users that are in that country. I also want a search feature where users can search for locations or areas in their country and filter data or listings according to that. Similar to how https://www.kijiji.ca/ does it.

I tried using bubbles built in search bo and geographic address tools and current geographic location tools but It seems to not be working the way I want. And the plug ins that I can find online that people suggest no longer work. What can I do about this?