You can use a phone as a hotspot, but roaming charges for data are expensive.
I use my mobile on roaming with my local number when abroad - but I turn mobile data off, I need to receive calls on that number at all times.
So to avoid high data charges I use a little 4G hotspot and just stick a local prepaid SIM in it wherever I have travelled to.
This little unit cost me $100 and came with $80 of credit in Australia. Last time I used it in the UK I spent about £12 on data that would have cost hundreds if I had used my mobile for roaming data.
Using a hot spot makes sense, it allows you to keep your mobile number active worldwide through roaming and you turn mobile data off and use the hotspot with a prepaid SIM - much cheaper and usually more reliable.