Yes this is possible see the instructions at https://support.atlassian.com/jira-software-cloud/docs/set-up-issue-types-in-next-gen-projects/
A subtask is just another issue type apart from it belonging to a parent issue.
Note the special instructions around NOT creating a subtask called subtask.
Hope this helps
Sorry I should have been clearer in my earlier answer.
There is currently no way to create subtasks whilst continuing in a next-gen project (as of May 2020) but the instructions quoted show how you would convert to a classic project and then how you can set up your subtasks.