Get the OTP number send by SMS

Hi, please advice, how do I get OTP from SMS?
so I want to automate testing login using OTP and the OTP send by SMS.

thank u so much