To create a public IP address, search for ‘public ip address’ in the Azure Portal:

Select the Subscription and Resource Group where you want to create the public IP address:

In the next tab, DDoS Protection allows you to either inherit protection from the virtual network or specific to the IP address: