I would suggest instead, if one really is interested in the topic of networking and port scanning, to set up a lab environment, either virtually, or physically.
This is not very costly, unless you need to scan specific enterprise systems that can not be emulated, and are beyond ones price range - to buy to learn.
There are also platforms like tryhackme, hackthebox etc., that offer both free and paid networks, on which one can legally scan.
> This is not very costly, unless you need to scan specific enterprise systems that can not be emulated, and are beyond ones price range - to buy to learn.
This is where my advice comes in handy :)
For live practice, you should scan IP addresses in countries that are unlikely to be able to prosecute you, like Russia (if you are a westener)*
* joking (maybe)