Refer System.Text.Json.JsonSerializer instead of newton soft json serializer... Sorry Dinesh I had to repeat your answer as I couldn't upvote... But I tested it and it worked like a charm
class OTPData{ public string OTP {get;set} ....... }
var result = System.Text.Json.JsonSerializer.Deserialize<OTPData>
(response.ToString());
string otp = result.OTP;
string username = result.UserName;
string type = result.type;