Your code as shown executes without problem - it may or may not execute when you try to run the query, but since we have no access to your DB we can't test that.
I'd add a BEGIN and END though:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[getUserCartItem]
(
@PID int,
@UserID int
)
AS
BEGIN
SELECT * FROM tblProducts WHERE PID=@PID
SELECT * FROM tblCart WHERE PID = @PID AND UID = @UserID
END
That code will return two data sets - one for each SELECT.
In order to combine them and return a single dataset, you would need to look at the database design, the relationships between the two tables, and exactly what you wanted to return before you even started coding SQL!
We can't do any of that for you!