If this is just for you and for fun, then the world's your oyster. Do whatever you want.
If this is something you plan on actually bringing to a table, then you 100% must have a conversation with your DM about this. Creating characters based off of monsters that you actually plan to play is not something you do without DM approval and guidance.
I want to create a character with the race - Ooze/Slime. Can you explain what classes and subclasses might be suitable for it?
Can I use a custom race? Because my character’s abilities are tied to the slime race itself…
No, I was just thinking that you could create a character based on a creature, not a sentient race (human, elf, dwarf).
If this is just for you and for fun, then the world's your oyster. Do whatever you want.
If this is something you plan on actually bringing to a table, then you 100% must have a conversation with your DM about this. Creating characters based off of monsters that you actually plan to play is not something you do without DM approval and guidance.