Improve the processing speed of the procedure

Is there any way to improve the processing speed of the procedure? I converted a procedure from oracle to sql sever but sql server seem to be very slow. Oracle take 1m30s but sql take 40m. Is it related to server config, ram, ...?

share your query here so that we can have a look