Someone is connecting their device using my Wi-Fi?

So for the past few weeks my internet was extremely slow and i couldn't connect to any MInecraft servers and just now, a notification on my iMac popped up saying that someone connected their device using my Wi-Fi, providing me the IP address of the person connecting their device using my Wi-Fi and telling me to try again later. Then I decided to search up the IP address to see if I can find out who was using my Wi-Fi but they blocked their location. Is there any possible things to do to find out this information or any way to stop the person from using my Wi-Fi?

Set a password to protect it.

If they were using your Wi-Fi then their IP address was your own. Can't get much information that way!

The IP that was provided is just your local network IP the new device will be given one when connecting to your network. You should use a password on your Wi-Fi to stop others accessing your network.

Just simply change your Wi-Fi password.