In latin america, that stucco-like finish is commonly called paneta (with a tilde over the n). It is a sand mix of cement just like ready-mix mortar for bricklaying. The whole issue of texture arises from the size of the sand grains and the finishing technique. Basically it goes like this: you prepare the surface by removing any loose material, then if the underlying surface is
concrete, there is often some kind of acrylic-based bonding aid that can be painted on and that supposedly will "re-emulsify" when the wet cement is applied on top to help with adhesion.
When you mix the actual mortar, the paneta, you mix it very carefully to be wetted but firm; not crumbly and yet very low slump. You may literally add water drop by drop to get it just so. You trowel the mortar over the patch area and use a "float" - usually
wood or hard rubber but maybe steel - to smooth it flat and even with the surroundings. Then you wait about an hour or so for it to start setting.
Once the cement is firm, but still damp, you "polish" it with a damp sponge; round and round and rinse often. This will remove cement paste and expose the sand grains to give the rough surface. You might have to experiment a little with different textures of rag or sponge in a small area. A coarser and more textured finish could be made with a coarse brush. But you will almost certainly not exactly match the old finish - you cannot know what sand source was used or what finish material may have been employed - it might even have been a textured molded surface that was poured? But usually it does not matter so much; once it is painted it will look fine.