I set my RPi to have a fixed IP.
First Scenario: After connecting my RPi to my WiFi I opened Terminal on my mac, type ssh pi@192.168.0.38 and I log in with password raspberry. It workes.
Second Scenario: I create a Personal Hotspot using my iPhone. I connect my RPi to that Personal Hotspot. I connect my Mac to that Personal Hotspot. I opened Terminal on my mac, type ssh pi@192.168.0.38 and
After a while, the terminal shows
ssh: connect to host 192.168.0.38 port 22: Operation timed out