You can use either
SELECT SCOPE_IDENTITY()
or
SELECT IDENT_CURRENT(‘tablename’)
based on your needs.
Scope identity gives you the last IDENTITY value generated by a connection and a statement in the same scope.
ident_current function returns the last IDENTITY value produced in a table.