Your function name cannot contain a
unless you escape it.
Database Identifiers - SQL Server | Microsoft Docs
Give it a simpler name:
CREATE FUNCTION dbo.ReservationDetails (@IDMovies INT)
Or create it in a separate schema:
CREATE FUNCTION Reservations.ReservationDetails (@IDMovies INT)
If you really
want to shoot yourself in the foot, escape the function name. You will also need to escape it every time you call it.
CREATE FUNCTION [dbo].[Reservations.ReservationDetails] (@IDMovies INT)