Just a minimal CARTO.js example with the defalut Leaflet Control Geocoder.
Simply add the JS and CSS imports
<!-- Geocoder-->
<link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css" />
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
And then add the control to your map
// Geocoder
L.Control.geocoder().addTo(map);
By default it uses OpenStreetMap data (same as Mapbox) but the plugin provides many other geocoders ready to use, some of them needing from you to provide credentials for the specific geocoding service provider.