I want to know how to only allow x users to edit a list but only with the form. This means that the user shouldn``t be able to see the list page.
What are the contents you want to hide from end users? If you do not want to show items created by other users, you can enable item-level permission
If you do not want the user be able to edit list page, break the inheritance on the site pages library and only give them read permission.
Or a bit more complex way, you can create a dummy list with the required forms. Make users to submit forms in your dummy list and add a flow/workflow to update required information in your true list.
If the fixes don't help you, please share us with more information about your requirements.
I suggest you create an HTML form in another page, and let that form submit to the list (but you also need to consider the permission levels you would give to the users in order for them to be able to create/update an item)
Hope this concept help you out, Happy learning!