Sql Server consuming lot of memory Creating Bottleneck for my web application Hosted in the same server
I'll answer your second question first, which is typically it's ideal to host your SQL Server instance on its own dedicated server, to maximize the resources it has available to it without causing contention for other applications or battling contention from other applications.
The Memory, CPU, I/O, and Disk Space available on the server are all key resources utilized by a SQL Server instance, and some of them are even eagerly acquired and held onto to maximize efficiency and performance of that SQL Server instance. For example, SQL Server will generally continually acquire more Memory (out of the total allocated to the instance) over time for multiple uses of caching, and generally won't release that Memory back to the server, unless the Windows OS indicates a critical Memory pressure event, or the server or instance is restarted.
To answer your first question, we can't accurately tell you the issue you're currently facing without more details and context, unfortunately. It's too complicated, and broad of a question, without observing actual concrete examples with metrics. But if you're certain
your SQL Server instance is affecting performance of your web application, then you're likely under-provisioned resource-wise. 12 GB of Memory sounds suspiciously low for both the OS (which likely needs a minimum of 4 GB itself) and the web application itself.
Aside from that, I wouldn't doubt you're seeing other resource contention either from the CPU or I/O. Your best bet is to try to isolate a specific example of a performance issue your web application is experiencing so that it's reproducible, and then measuring what's actively running on your SQL Server instance concurrent to those performance issues of the application. I find Adam Machanic's sp_whoisactive very helpful as a starting point to see what is currently running on my SQL Server at any given instant.