Creating a stored procedure can be, at the level you need it, learned rather quickly from
Create a Stored Procedure | Microsoft Docs[
^]
The basic format is:
CREATE PROCEDURE SP_NAME_YOU_LIKE (
@Declare_Input datatype,
@moreInput datatype,
etc.
)
AS
-- Your SQL Query of any sort. Use the @values for controlling filters,
such as
SELECT * FROM Some_Table WHERE colVal=@Declare_Input