By default, AWS assigns a public IPv4 IP to all instances. These IPs belong to the AWS pool of available IPs and change every time an instance is stopped or restarted. To avoid a change of your IP constantly, you can make use of a feature known as elastic IP on AWS.
An elastic IP is of static nature and remains attached to the instance up until it is detached by the user.
I have explained to steps to attach an elastic IP below :
STEP 1: Choose Elastic IP under Network and Security and click on Allocate Elastic IP Address
STEP 2: Choose Amazon's pool of IPv4 addresses and click allocate
STEP 3: You will then obtain a box with the option of Associating the Elastic IP address. Choose that and associate with your desired instance.
I hope this resolves your issue. If you further want to learn about AWS, check out the courses at Intellipaat.